Reducers / Middlewares
Create store with integrated redux reducers/middlewares.
You can also use Factory.createStore with regular redux reducer and middleware by supply the reducer and middlewares to it.
Custom Reducers
function counter(state, action) {
switch (action.type) {
case 'COUNTER_ADD':
return state++;
case 'COUNTER_MINUS':
return state--;
default:
return state
}
}
import { SinkFactory } from 'redux-sink';
const store = SinkFactory.createStore({
reducers: {
counter: counter
}
});Custom Middlewares
Last updated
Was this helpful?