Module

Flame

Package
purescript-flame
Repository
easafe/purescript-flame

Entry module for a default Flame application

Re-exports from Flame.Application.Effectful

#World Source

type World model message = { event :: Maybe Event, previousMessage :: Maybe message, previousModel :: Maybe model, update :: model -> message -> Aff model, view :: model -> Aff Unit }

World contains context information for Application.update

  • update – recurse Application.update with given model and message
  • view – forcefully update view with given model
  • event – the Event currently being handled
  • previousModel – model before last update
  • previousMessage – last message raised

#ResumedApplication Source

type ResumedApplication model message = App model message (init :: Maybe message, update :: World model message -> model -> message -> Aff model)

ResumedApplication contains

  • init – initial list of messages to invoke update with
  • view – a function to update your markup
  • update – a function to update your model

#Application Source

type Application model message = App model message (init :: Tuple model (Maybe message), update :: World model message -> model -> message -> Aff model)

Application contains

  • init – the initial model and an optional message to invoke update with
  • view – a function to update your markup
  • update – a function to update your model

#resumeMount_ Source

resumeMount_ :: forall model m message. Generic model m => DecodeRep m => QuerySelector -> ResumedApplication model message -> Effect Unit

Mount a Flame application on the given selector which was rendered server-side, discarding the message Channel

#resumeMount Source

resumeMount :: forall model m message. Generic model m => DecodeRep m => QuerySelector -> ResumedApplication model message -> Effect (Channel (Maybe message))

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

#mount_ Source

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

Mount a Flame application on the given selector, discarding the message Channel

#mount Source

mount :: forall model message. QuerySelector -> Application model message -> Effect (Channel (Maybe message))

Mount a Flame application on the given selector

Re-exports from Flame.Application.PreMount

#preMount Source

preMount :: forall model m message. Generic model m => EncodeRep m => QuerySelector -> PreApplication model message -> Effect String

Re-exports from Flame.Types

#PreApplication Source

type PreApplication model message = App model message (init :: model)

ResumedApplication contains

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

#Key Source

type Key = String

#Html Source

data Html message

Convenience wrapper around VNode

Instances

#(:>) Source

Operator alias for Data.Tuple.Tuple (right-associative / precedence 6)

Infix tuple constructor

Re-exports from Web.DOM.ParentNode