Immutable and type-checked state and actions for Redux (built on tcomb library)
Example
// typesconst State = tIntegerconst PositiveInteger = tconst Action = // reducer { return state} // configureconst store = // okstorestore // bad payloadstore // throws [tcomb] Invalid value -2 supplied to Action(INCREMENT)/delta: PositiveInteger // typostore // throws [tcomb] Invalid value { "type": "INCRE", "delta": 1 } supplied to Action
API
type State;
createCheckedMiddleware(Action: Type) -> Function
createCheckedReducer(reducer: Reducer, State: Type) -> Reducer
createActionType(actions: {[key: string]: Type}) -> Type
License
The MIT License (MIT)