Module

Pha.App

Package
purescript-pha
Repository
gbagan/purescript-pha

#app Source

app :: forall effs state msg. { init :: Tuple state (Action state effs), interpreter :: VariantF effs (Effect Unit) -> Effect Unit, subscriptions :: state -> Array (Sub msg), update :: msg -> Action state effs, view :: state -> Document msg } -> App msg state effs
app ∷ ∀msg state effs. {
    init ∷ Tuple state (Action state effs),
    view ∷ state → Document msg,
    update ∷ msg → Action state effs,
    subscriptions ∷ state → Array (Sub msg)
} → App effs

#sandbox Source

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

#attachTo Source

attachTo :: forall effs state msg. String -> App msg state effs -> Effect Unit

#Document Source

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

#App Source

newtype App msg state effs