illustrious/state
Types
The decoder function which takes in a JSON-decoded dynamic from the initializer or server loader and returns an effect which can be executed in order to populate the application state before rendering
pub type Decoder(action) =
fn(Dynamic) ->
Result(IllustriousAction(action), dynamic.DecodeErrors)
The internal action/message type which is used by the illustrious application.
pub type IllustriousAction(orig_action) {
Perform(orig_action)
GoTo(path: String)
Redirect(path: String)
Back
Forward
SetPath(parsed_path: Path)
Noop
All(List(IllustriousAction(orig_action)))
}
Constructors
-
Perform(orig_action)
-
GoTo(path: String)
-
Redirect(path: String)
-
Back
-
Forward
-
SetPath(parsed_path: Path)
-
Noop
-
All(List(IllustriousAction(orig_action)))
The internal state/model which is used by the illustrious application to track its own route state as well as your own state.
pub type IllustriousModel(model) {
IllustriousModel(route: Path, inner_model: model)
}
Constructors
-
IllustriousModel(route: Path, inner_model: model)