Module

Flame

Package
purescript-flame
Repository
easafe/purescript-flame

Entry module for a default Flame application

Re-exports from Flame.Application

#Update Source

type Update model message = model -> message -> Tuple model (Array (Aff (Maybe message)))

#ResumedApplication Source

type ResumedApplication model message = App model message (update :: Update model message)

ResumedApplication contains

  • view – a function to update your markup
  • update – a function to update your model
  • subscribe – list of external events

#Application Source

type Application model message = App model message (model :: model, update :: Update model message)

Application contains

  • model – starting model
  • view – a function to update your markup
  • update – a function to update your model
  • subscribe – list of external events

#resumeMount_ Source

resumeMount_ :: forall model message. UnserializeState model => QuerySelector -> ResumedApplication model message -> Effect model

Mount a Flame application on the given selector which was rendered server-side

#resumeMount Source

resumeMount :: forall id model message. UnserializeState model => Show id => QuerySelector -> AppId id message -> ResumedApplication model message -> Effect model

Mount on the given selector a Flame application which was rendered server-side and can be fed arbitrary external messages

#noMessages Source

noMessages :: forall model message. model -> Tuple model (Array (Aff (Maybe message)))

#mount_ Source

mount_ :: forall model message. QuerySelector -> Application model message -> Effect Unit

Mount a Flame application on the given selector

#mount Source

mount :: forall id model message. Show id => QuerySelector -> AppId id message -> Application model message -> Effect Unit

Mount a Flame application that can be fed arbitrary external messages

Re-exports from Flame.Application.Internal.PreMount

#preMount Source

preMount :: forall model message. SerializeState model => QuerySelector -> PreApplication model message -> Effect String

Re-exports from Flame.Types

#Subscription Source

type Subscription message = Tuple3 Source EventName (Foreign -> message)

Subscriptions are events from outside the view, e.g. window, document or CustomEvent

#PreApplication Source

type PreApplication model message = { model :: model, view :: model -> Html message }

PreApplication contains

  • model – the initial model
  • view – a function to update your markup

#Key Source

type Key = String

#Html Source

data Html t0

The type of virtual nodes

Instances

#AppId Source

newtype AppId :: forall k. Type -> k -> Typenewtype AppId a b

Constructors