this repo has no description
lustre frontent oat-ui gleam
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

:bulb: document view, init and update functions

+11 -1
+11 -1
client/src/client.gleam
··· 37 37 InitOpts(api: uri.Uri) 38 38 } 39 39 40 + /// ┌──────┐ 41 + /// ┌──────│ View │←─────┐ 42 + /// ↓ └──────┘ │ 43 + /// ┌───────┐ ┌────────┐ 44 + /// │ Model │───────────→│ UPDATE │ 45 + /// └───────┘ └────────┘ 46 + /// 40 47 pub fn main() -> Nil { 41 48 let assert Ok(api) = { 42 49 use value <- result.try(envoy.get("API_URL")) ··· 62 69 63 70 // INIT ------------------------------------------------------------------------ 64 71 72 + /// Build initial application Model 65 73 pub fn init(opts: InitOpts) -> #(Model, Effect(Msg)) { 66 74 // Get the `Uri` of the page when it first loaded. 67 75 let assert Ok(uri) = modem.initial_uri() ··· 118 126 element_view |> element.map(f) 119 127 } 120 128 129 + /// Render page HTML 121 130 pub fn view(model: Model) -> element.Element(Msg) { 122 131 case model { 123 132 // HOME PAGE --------------------------------------------------------------- ··· 133 142 } 134 143 135 144 // UPDATE ---------------------------------------------------------------------- 136 - // 145 + 146 + /// Update current application `Model` 137 147 pub fn update(model: Model, msg: Msg) -> #(Model, Effect(Msg)) { 138 148 case model, msg { 139 149 // NAVIGATION