From 8d05b2dea4afc46a03dc12e26d7b37d45140eaf9 Mon Sep 17 00:00:00 2001 From: Hayleigh Thompson Date: Sat, 19 Aug 2023 22:40:55 +0100 Subject: :sparkles: Allow starting args to be passed to an app's init function on start. --- lib/test/examples/counter.gleam | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/test/examples/counter.gleam') diff --git a/lib/test/examples/counter.gleam b/lib/test/examples/counter.gleam index 759ebdf..4faf00c 100644 --- a/lib/test/examples/counter.gleam +++ b/lib/test/examples/counter.gleam @@ -12,8 +12,8 @@ pub fn main() { // A `simple` lustre application doesn't produce `Effect`s. These are best to // start with if you're just getting started with lustre or you know you don't // need the runtime to manage any side effects. - let app = lustre.simple(init, update, render) - let assert Ok(_) = lustre.start(app, "[data-lustre-app]") + let app = lustre.simple(init, update, view) + let assert Ok(_) = lustre.start(app, "[data-lustre-app]", Nil) } // MODEL ----------------------------------------------------------------------- @@ -21,7 +21,7 @@ pub fn main() { pub type Model = Int -pub fn init() -> Model { +pub fn init(_) -> Model { 0 } @@ -43,7 +43,7 @@ pub fn update(model: Model, msg: Msg) -> Model { // VIEW ------------------------------------------------------------------------ -pub fn render(model: Model) -> Element(Msg) { +pub fn view(model: Model) -> Element(Msg) { div( [], [ -- cgit v1.2.3