Module
React.Halo.Internal.Eval
- Package
- purescript-react-halo
- Repository
- robertdp/purescript-react-halo
#EvalSpec Source
type EvalSpec props ctx state action m = { onAction :: action -> HaloM props ctx state action m Unit, onFinalize :: Maybe action, onInitialize :: { context :: ctx, props :: props } -> Maybe action, onUpdate :: { context :: ctx, props :: props } -> { context :: ctx, props :: props } -> Maybe action }
A simpler interface for building the components eval function. The main lifecycle events map directly into
actions, so only the action handling logic needs to be written using HaloM
.
#defaultEval Source
defaultEval :: forall props ctx action state m. EvalSpec props ctx state action m
The empty EvalSpec
.
#runInitialize Source
runInitialize :: forall props ctx state action. HaloState props ctx action state -> Effect Unit
#handleUpdate Source
handleUpdate :: forall props ctx state action. HaloState props ctx action state -> props -> ctx -> Effect Unit