Module

Oak

Package
purescript-oak
Repository
ehrenmurdick/purescript-oak

#App Source

data App c model msg

Constructors

  • App { model :: model, next :: msg -> model -> Cmd c msg, update :: msg -> model -> model, view :: model -> Html msg }

#createApp Source

createApp :: forall c model msg. { init :: model, next :: msg -> model -> Cmd c msg, update :: msg -> model -> model, view :: model -> Html msg } -> App c model msg

#Runtime Source

type Runtime m = { model :: m, root :: Maybe Node, tree :: Maybe Tree }

#handler Source

handler :: forall h c eff model msg. STRef h (Runtime model) -> App c model msg -> msg -> Eff (dom :: DOM, st :: ST h | eff) (Runtime model)

#runCmdImpl Source

runCmdImpl :: forall msg model e c. (msg -> Eff e (Runtime model)) -> Cmd c msg -> Eff e (Runtime model)

#runCmd Source

runCmd :: forall msg model e c. (msg -> Eff e (Runtime model)) -> Cmd c msg -> Eff e (Runtime model)

#runApp_ Source

runApp_ :: forall msg model h e c. App c model msg -> Eff (dom :: DOM, st :: ST h | e) Node

#finalizeRootNode Source

finalizeRootNode :: forall r. Eff (createRootNode :: NODE | r) Node -> Eff r Node

#runApp Source

runApp :: forall msg model e c. App c model msg -> Eff (dom :: DOM | e) Node