Module

Flame.Application.NoEffects

Package
purescript-flame
Repository
easafe/purescript-flame

Run a Flame application without side effects

The update function is a pure function from model and message raised

#Application Source

type Application model message = App model message (init :: model, update :: model -> message -> model)

Application contains

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

#mount Source

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

Mount a Flame application on the given selector

#mount_ Source

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

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

#ResumedApplication Source

type ResumedApplication model message = App model message (update :: model -> message -> model)

ResumedApplication contains

  • 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 (Channel (Array message))

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

#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