aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Martini <despair.blue@gmail.com>2023-03-07 02:15:37 +0100
committerGitHub <noreply@github.com>2023-03-07 01:15:37 +0000
commit26bfe8b0ed866a94ddcc719a517f9f5cd28525ae (patch)
tree7647f5cb1f8b236bf294995f73f2c19f2fdf6824
parent44ebb3d87738847f9363f46e7027a5b022144a5c (diff)
downloadlustre-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.md6
1 files changed, 3 insertions, 3 deletions
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("+")]),
],
)
}