Module
Pux
- Package
- purescript-pux
- Repository
- alexmingoia/purescript-pux
#App Source
type App e ev st = { events :: Signal (List ev), input :: Channel (List ev), markup :: Signal (Markup e), state :: Signal st }
An App
is a record consisting of:
markup
– A signal ofMarkup e
representing the current view of the app. This is consumed by renderers.state
– A signal representing the application's current state.input
– A channel representing the application's event input.
#Config Source
type Config e ev st = { foldp :: FoldP st ev, initialState :: st, inputs :: Array (Signal ev), view :: st -> Markup e }
The configuration of an app consists of foldp and view functions along
with an initial state. The foldp
and view
functions describe how to
step the state and view | the state.
The inputs
array is for any external inputs you might need. These will
be merged into the app's input signal.
#mapEffects Source
mapEffects :: forall st b a. (a -> b) -> EffModel st a -> EffModel st b
Map over the effects of an EffModel
.