Releases: RoyalIcing/flambeau
Releases · RoyalIcing/flambeau
Add combineReducers()
Additions:
- Add
combineReducers()
for combining Flambeau-style reducers. - Dispatched actions now always have a
type
(ofFLAMBEAU_ACTION_TYPE
).
Breaking changes:
getConsensus()
now acceptsgetStates()
instead ofstates
.- Built-in store class is now exported at
flambeau/Store
– this might be removed outright down the line. - Removed
SimpleGraphController
.
Improved getConsensus()
Breaking changes:
- Using getConsensus() is much better, with it now appearing on the connected action set (e.g.
currentActionSet.getConsensus.yourIntrospection
within an action creator)- Consensus result now returns an object with
some
,every
,reduce
, andtoArray
methods. See [the docs]((docs/reducers.md) for more information.
- Consensus result now returns an object with
Composable API with Redux support
Adds support for Redux, allowing integration with the fantastic Redux community’s middleware and tools.
import { createStore, applyMiddleware } from 'redux';
import { createRootReducer, connectActionSetsToStore } from 'flambeau/redux';
import actionSets from '../actions';
import reducers from '../reducers';
const createStoreWithMiddleware = applyMiddleware(
// All your favorite redux middleware
)(createStore);
const rootReducer = createRootReducer({ reducers, idToProps: {} });
export const store = createStoreWithMiddleware(rootReducer, initialState);
export const connectedActionSets = connectActionSetsToStore({ actionSets, store });