Module

Radox.Internal.Store

Package
purescript-radox
Repository
danieljharvey/purescript-radox

#update Source

update :: forall actionType stateType. Ref stateType -> Listeners stateType -> Effect stateType -> CombinedReducer actionType stateType -> actionType -> Effect Unit

This takes our action runs it through the reducers, updates listeners with the result And then updates the ref with the new value Note actionType must have have been lift-ed into the Variant for use here

#getState Source

getState :: forall stateType. Ref stateType -> Effect stateType

Read the current state this is saved in the mutable Ref and returns it