From 26bfe8b0ed866a94ddcc719a517f9f5cd28525ae Mon Sep 17 00:00:00 2001 From: Danny Martini Date: Tue, 7 Mar 2023 02:15:37 +0100 Subject: =?UTF-8?q?=F0=9F=94=80=20Update=20example=20in=20readme=20to=20re?= =?UTF-8?q?flect=20event=20handler=20changes.=20(#6)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It wasn't compiling with the current version of lustre on hex. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 966f259..1373acb 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ A framework for building create web apps – powered by Gleam and React! import gleam/int import lustre import lustre/element.{button, div, p, text} -import lustre/event.{dispatch, on_click} +import lustre/event.{on_click} import lustre/cmd pub fn main() { @@ -35,9 +35,9 @@ fn render(state) { div( [], [ - button([on_click(dispatch(Decr))], [text("-")]), + button([on_click(Decr)], [text("-")]), p([], [text(int.to_string(state))]), - button([on_click(dispatch(Incr))], [text("+")]), + button([on_click(Incr)], [text("+")]), ], ) } -- cgit v1.2.3