Module
React.Halo.Internal.Eval
- Package
- purescript-react-halo
- Repository
- robertdp/purescript-react-halo
#EvalSpec Source
type EvalSpec :: Type -> Type -> Type -> (Type -> Type) -> Type
type EvalSpec props state action m = { onAction :: action -> HaloM props state action m Unit, onFinalize :: Maybe action, onInitialize :: props -> Maybe action, onUpdate :: 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 action state m. EvalSpec props state action m
The empty EvalSpec
.
#runInitialize Source
runInitialize :: forall props state action. HaloState props action state -> Effect Unit
#handleUpdate Source
handleUpdate :: forall props state action. HaloState props action state -> props -> Effect Unit