Module
Flame.Application.Effectful
- Package
- purescript-flame
- Repository
- easafe/purescript-flame
The default way to run a Flame application
The update function carries context information and runs on Aff
#Application Source
type Application model message = App model message (init :: Tuple model (Maybe message), update :: World model message -> model -> message -> Aff model)Application contains
init– the initial model and an optional message to invokeupdatewithview– a function to update your markupupdate– a function to update your modelinputs– an array of signals
#mount Source
mount :: forall message model. String -> Application model message -> Effect UnitMount a Flame application in the given selector
#World Source
type World model message = { event :: Maybe Event, previousMessage :: Maybe message, previousModel :: model, update :: model -> message -> Aff model, view :: model -> Aff Unit }World contains context information for Application.update
update– recurseApplication.updatewith given model and messageview– forcefully update view with given modelevent– theEventcurrently being handledpreviousModel– model before last updatepreviousMessage– last message raised