Update README.md

This commit is contained in:
Rob Wagner 2023-11-27 19:26:50 -05:00
parent 36df71fb2f
commit 138087edc4
No known key found for this signature in database
GPG key ID: 53CCB4497B15CF61

View file

@ -155,7 +155,8 @@ async fn index() -> (&'static str, HxResponseTrigger) {
can use via the `serde` feature flag and the `HxEvent` type. can use via the `serde` feature flag and the `HxEvent` type.
```rust ```rust
use axum_htmx::HxEvent; use axum_htmx::serde::HxEvent;
use serde_json::json;
// Note that we are using `HxResponseTrigger` from the `axum_htmx::serde` module // Note that we are using `HxResponseTrigger` from the `axum_htmx::serde` module
// instead of the root module. // instead of the root module.
@ -171,7 +172,7 @@ async fn index() -> (&'static str, HxResponseTrigger) {
) )
.unwrap(); .unwrap();
("Hello, world!", HxResponseTrigger(event)) ("Hello, world!", HxResponseTrigger(vec![event]))
} }
``` ```