redux-convention
Facilitates conversion of Flux Standard Action (FSA) to Canonical Composition Action (CCA) and vice-versa.
Usage
Function
redux-convention
exposes mapper
object that in turn defines two functions: fromCCAtoFSA
and fromFSAtoCCA
. Input is a plan object. Output is a shallow copy of the input with mapped properties.
; let CCAction FSAction; CCAction = name: 'foo' data: foo: 'bar' metadata: baz: 'qux' ; FSAction = mapper;CCAction = mapper;
Middleware
redux-convention
exposes middleware
object that in turn defines two functions: fromCCAtoFSA
and fromFSAtoCCA
. These functions are designed to work with Redux middleware, specifically, the applyMiddleware
function.
Middleware can be used multiple times to convert FSA to CCA.
; ; ; ; ; let reducer state store; reducer = ; state = Immutable; state = ; store = createStorereducer state; ;