Module

Pha.App

Package
purescript-pha
Repository
gbagan/purescript-pha

#app Source

app :: forall effs state msg. App msg state effs -> AppBuilder msg state

#sandbox Source

sandbox :: forall state msg. { init :: state, update :: msg -> state -> state, view :: state -> VDom msg } -> AppBuilder msg state
sandbox ∷ ∀msg state effs. {
    init ∷ state,
    view ∷ state → VDom msg,
    update ∷ msg → state → state
} → Effect Unit

#attachTo Source

attachTo :: forall state msg. String -> AppBuilder msg state -> Effect Unit

#Document Source

type Document msg = { body :: VDom msg, title :: String }

#App Source

type App msg state effs = { init :: Tuple state (Update state effs), interpreter :: Interpreter effs, subscriptions :: state -> Array (Sub msg), update :: msg -> Update state effs, view :: state -> Document msg }

Re-exports from Pha.App.Internal

#Interpreter Source

type Interpreter effs = VariantF effs (Effect Unit) -> Effect Unit