From fa1f447bd0eaf9d27b6af407f90477b81e70b358 Mon Sep 17 00:00:00 2001 From: Hayleigh Thompson Date: Fri, 5 Apr 2024 13:22:40 +0100 Subject: =?UTF-8?q?=F0=9F=94=80=20Write=20a=20guide=20on=20server-side=20r?= =?UTF-8?q?endering.=20(#103)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * :memo: Fix typos in state management guide. * :memo: Begin writing ssr guide. * :memo: Rename discard init arg to '_flags' in all examples. * :memo: Show simple static HTML rendering example. * :memo: Expand hydration section. * :memo: Finish ssr guide. * :wrench: Add ssr guide to built docs pages. --- examples/03-controlled-inputs/src/app.gleam | 2 +- examples/04-custom-event-handlers/src/app.gleam | 2 +- examples/05-http-requests/src/app.gleam | 2 +- examples/06-custom-effects/src/app.gleam | 2 +- examples/07-routing/src/app.gleam | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'examples') diff --git a/examples/03-controlled-inputs/src/app.gleam b/examples/03-controlled-inputs/src/app.gleam index f620e6a..b4a29c2 100644 --- a/examples/03-controlled-inputs/src/app.gleam +++ b/examples/03-controlled-inputs/src/app.gleam @@ -28,7 +28,7 @@ type Model { Model(value: String, length: Int, max: Int) } -fn init(_) -> Model { +fn init(_flags) -> Model { Model(value: "", length: 0, max: 10) } diff --git a/examples/04-custom-event-handlers/src/app.gleam b/examples/04-custom-event-handlers/src/app.gleam index 011b09c..e5d7fe1 100644 --- a/examples/04-custom-event-handlers/src/app.gleam +++ b/examples/04-custom-event-handlers/src/app.gleam @@ -30,7 +30,7 @@ type Model { Model(value: String, length: Int, max: Int) } -fn init(_) -> Model { +fn init(_flags) -> Model { Model(value: "", length: 0, max: 10) } diff --git a/examples/05-http-requests/src/app.gleam b/examples/05-http-requests/src/app.gleam index 9442cf3..5e0df3e 100644 --- a/examples/05-http-requests/src/app.gleam +++ b/examples/05-http-requests/src/app.gleam @@ -38,7 +38,7 @@ type Quote { Quote(author: String, content: String) } -fn init(_) -> #(Model, Effect(Msg)) { +fn init(_flags) -> #(Model, Effect(Msg)) { #(Model(quote: None), effect.none()) } diff --git a/examples/06-custom-effects/src/app.gleam b/examples/06-custom-effects/src/app.gleam index e04484a..4771bfd 100644 --- a/examples/06-custom-effects/src/app.gleam +++ b/examples/06-custom-effects/src/app.gleam @@ -27,7 +27,7 @@ type Model { Model(message: Option(String)) } -fn init(_) -> #(Model, Effect(Msg)) { +fn init(_flags) -> #(Model, Effect(Msg)) { #(Model(message: None), read_localstorage("message")) } diff --git a/examples/07-routing/src/app.gleam b/examples/07-routing/src/app.gleam index e82f895..fbdc786 100644 --- a/examples/07-routing/src/app.gleam +++ b/examples/07-routing/src/app.gleam @@ -44,7 +44,7 @@ type Guest { Guest(slug: String, name: String) } -fn init(_) -> #(Model, Effect(Msg)) { +fn init(_flags) -> #(Model, Effect(Msg)) { #( Model( current_route: Home, -- cgit v1.2.3