1.2.0 • Published 6 years ago
@seedrs/redux-reducers v1.2.0
@seedrs/redux-reducers
A package for reusable reducers.
Setup
# With yarn (preferred)
yarn add @seedrs/redux-reducers
npm i @seedrs/redux-reducers --save
Usage
To use the reducers, you can import them as named imports.
For example:
import { combineReducers } from 'redux';
import { handleActions } from 'redux-actions';
import { takeResult } from '@seedrs/redux-reducers';
import { SOME_ACTION } from 'constants/actions';
const reducer = combineReducers({
some_slice_of_state: handleActions({
[SOME_ACTION]: () => takeResult(SOME_ACTION)
}, null)
});
export default reducer
For more detailed usage, use the links below: