diff options
author | Danny Martini <despair.blue@gmail.com> | 2023-03-07 02:15:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-07 01:15:37 +0000 |
commit | 26bfe8b0ed866a94ddcc719a517f9f5cd28525ae (patch) | |
tree | 7647f5cb1f8b236bf294995f73f2c19f2fdf6824 | |
parent | 44ebb3d87738847f9363f46e7027a5b022144a5c (diff) | |
download | lustre-26bfe8b0ed866a94ddcc719a517f9f5cd28525ae.tar.gz lustre-26bfe8b0ed866a94ddcc719a517f9f5cd28525ae.zip |
🔀 Update example in readme to reflect event handler changes. (#6)
It wasn't compiling with the current version of lustre on hex.
-rw-r--r-- | README.md | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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("+")]), ], ) } |