From 138087edc49a7aa36d8b3f85d545fce81a5aa469 Mon Sep 17 00:00:00 2001 From: Rob Wagner Date: Mon, 27 Nov 2023 19:26:50 -0500 Subject: [PATCH] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7bdb487..ff46ccb 100644 --- a/README.md +++ b/README.md @@ -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])) } ```