Module
JollyPong
- Package
- purescript-jolly-pong
- Repository
- justinwoo/purescript-jolly-pong
#Reducer Source
newtype Reducer state action
A reducer. Note that the initial state in Redux is actually an undefined
value.
Constructors
Instances
(CombineReducers tail row state' action', Cons name stateA state' state, Union actionA action' action) => CombineReducers (Cons name (Reducer stateA (ActionVariant actionA)) tail) row state action
#Middleware Source
newtype Middleware state action
Middleware for Redux.
Constructors
Middleware (Store state action -> EffectFn1 action action -> EffectFn1 action action)
#ActionVariant Source
newtype ActionVariant (actionRow :: Row Type)
an action variant that is meant to be converted to whatever the user needs. while this form is runtime compatible, users should use libraries like purescript-variant and decode this variant into Variant as needed.
Constructors
ActionVariant { type :: String }
Instances
(CombineReducers tail row state' action', Cons name stateA state' state, Union actionA action' action) => CombineReducers (Cons name (Reducer stateA (ActionVariant actionA)) tail) row state action
#applyMiddleware Source
applyMiddleware :: forall state action. Array (Middleware state action) -> Effect Enhancer
Apply middleware.
#combineReducers Source
combineReducers :: forall rl actionRow stateRow reducersRow. RowToList reducersRow rl => CombineReducers rl reducersRow stateRow actionRow => Record reducersRow -> Reducer (Record stateRow) (ActionVariant actionRow)
combine reducers from a record of reducers produces a correctly typed state row users are expected to use the action variant as needed
#CombineReducers Source
class CombineReducers (rl :: RowList) (row :: Row Type) (state :: Row Type) (action :: Row Type) | rl -> row state action
class to take the rowlist of reducers record passed in and prepare the state record row and a row of actions to be handled
Instances
(CombineReducers tail row state' action', Cons name stateA state' state, Union actionA action' action) => CombineReducers (Cons name (Reducer stateA (ActionVariant actionA)) tail) row state action
CombineReducers Nil row () ()
#_createStore Source
_createStore :: forall initialState action state. EffectFn3 (Reducer state action) initialState Enhancer (Store state action)
#_combineReducers Source
_combineReducers :: forall action state reducers. reducers -> Reducer state action
- Modules
- JollyPong