mirror of
https://github.com/robertwayne/axum-htmx
synced 2024-12-28 03:09:32 +01:00
Update README.md
This commit is contained in:
parent
36df71fb2f
commit
138087edc4
1 changed files with 3 additions and 2 deletions
|
@ -155,7 +155,8 @@ async fn index() -> (&'static str, HxResponseTrigger) {
|
|||
can use via the `serde` feature flag and the `HxEvent` type.
|
||||
|
||||
```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
|
||||
// instead of the root module.
|
||||
|
@ -171,7 +172,7 @@ async fn index() -> (&'static str, HxResponseTrigger) {
|
|||
)
|
||||
.unwrap();
|
||||
|
||||
("Hello, world!", HxResponseTrigger(event))
|
||||
("Hello, world!", HxResponseTrigger(vec![event]))
|
||||
}
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in a new issue