Functions for building Routers that bind page navigation with Elmish.
Function or value | Description |
Full Usage:
definePageModel pageModel value
Parameters:
PageModel<'T>
-
The PageModel, retrieved from the endpoint passed to the function by M:inferWithModel`3.
value : 'T
-
The value of the page model to put inside pageModel.
|
Define the PageModel for a given endpoint.
Must be called inside the
|
Full Usage:
infer makeMessage getEndPoint
Parameters:
'ep -> 'msg
-
Function that creates the message for switching to the page pointed by an endpoint.
getEndPoint : 'model -> 'ep
-
Function that extracts the current endpoint from the Elmish model.
Returns: Router<'ep, 'model, 'msg>
A router for the given endpoint type.
|
Infer a router constructed around an endpoint type
|
Full Usage:
inferWithModel makeMessage getEndPoint defaultPageModel
Parameters:
'ep -> 'msg
-
Function that creates the message for switching to the page pointed by an endpoint.
getEndPoint : 'model -> 'ep
-
Function that extracts the current endpoint from the Elmish model.
defaultPageModel : 'ep -> unit
-
Function that indicates the default PageModel for a given endpoint.
Inside this function, call M:definePageModel to indicate the page model to use when switching to a new page.
Returns: Router<'ep, 'model, 'msg>
A router for the given endpoint type.
|
Infer a router constructed around an endpoint type
|
|