Skip to content

Latest commit

 

History

History
85 lines (54 loc) · 1.5 KB

Mini.md

File metadata and controls

85 lines (54 loc) · 1.5 KB

Module Redux.Mini

Store

data Store :: *

STORE

data STORE :: !

Action

newtype Action action

Reducer

type Reducer action state = action -> state -> state

The simple PureScript reducer

ReduxReducer

newtype ReduxReducer action state

A reducer wrapped for use with Redux

applyReducer

applyReducer :: forall action state. Reducer action state -> action -> state -> state

createReducer

createReducer :: forall action state. Reducer action state -> state -> ReduxReducer action state

Construct a Redux reducer, which wraps the underlying action in an Action newtype that gives it a "type" property when used in JavaScript FFI

createAction

createAction :: forall action. action -> Action action

Construct a pure Redux action

combineReducers

combineReducers :: forall reducers action state. {  | reducers } -> ReduxReducer action state

Easily combine reducers using the underlying Redux utility

provider

provider :: ReactClass { store :: Store }

The component from react-redux

connect

connect :: forall state actions ownerProps props. (state -> props) -> actions -> ReactClass props -> ReactClass ownerProps

The connect wrapper from react-redux. NOTE: The mergeProps and options arguments are not yet supported.