Module

React.Halo.Internal.State

Package
purescript-react-halo
Repository
robertdp/purescript-react-halo

#HaloState Source

newtype HaloState props ctx state action

HThe alo component state used during evaluation.

Constructors

#createInitialState Source

createInitialState :: forall props ctx state action. { context :: ctx, eval :: Lifecycle props ctx action -> HaloM props ctx state action Aff Unit, props :: props, state :: state, update :: state -> Effect Unit } -> Effect (HaloState props ctx state action)

Creates a starting HaloState, ready for initialization.

#fresh Source

fresh :: forall props ctx state action a. (Int -> a) -> HaloState props ctx state action -> Effect a

Issue a new identifier, unique to this component.