Functions to enable the router in an Elmish program.
Function or value | Description |
Full Usage:
mkSimpleStreamRendering initialModel load update view
Parameters:
'model
-
The model that is shown initially.
load : 'model -> Task<'model>
-
Load the model to be stream-rendered.
update : 'msg -> 'model -> 'model
-
The Elmish update function.
view : 'model -> Dispatch<'msg> -> Node
-
The Elmish view function.
Returns: Program<'model, 'msg>
|
|
Full Usage:
mkStreamRendering initialModel load update view
Parameters:
'model
-
The model that is shown initially.
load : 'model -> Task<'model * Cmd<'msg>>
-
Load the model to be stream-rendered.
update : 'msg -> 'model -> 'model * Cmd<'msg>
-
The Elmish update function.
view : 'model -> Dispatch<'msg> -> Node
-
The Elmish view function.
Returns: Program<'model, 'msg>
|
|
|
|
Full Usage:
withRouterInfer makeMessage getEndPoint program
Parameters:
'ep -> 'msg
-
Function that creates a message from an endpoint value.
getEndPoint : 'model -> 'ep
-
Function that extracts the current endpoint from the model.
program : Program<'model, 'msg>
-
The Elmish program.
Returns: Program<'a, 'model, 'msg, Node>
The Elmish program configured with routing.
|
|