Add field = value pairs to the body of a function like init in which the
the return value is of the form ( SomeTypeAlias, Cmd msg ). As in
the ReviewConfig item below, you specify the module name, the function
name, as well as a list of item {field = <fieldName>, value = <value>}
to be added to the function.
Install.Initializer.makeRule "Main"
"init"
[ { field = "message", value = "\"hohoho!\"" }, { field = "counter", value = "0" } ]Thus we will have
init : ( Model, Cmd BackendMsg )
init =
( { counter = 0
, message = "hohoho!"
, counter = 0
}
, Cmd.none
)Configuration for rule.
Create a rule that adds fields to the body of a function like
initin which the return value is of the form( Model, Cmd msg ). As in theReviewConfigitem below, you specify the module name, the function name, as well as the field name and value to be added to the function: