ducks
Version:
🦆🦆🦆 Ducks is a Reducer Bundles Manager that Implementing the Redux Ducks Modular Proposal with Great Convenience.
15 lines • 346 B
JavaScript
import * as types from './types.js';
const initialState = {
pong: 0,
};
const reducer = (state = initialState, action) => {
if (action.type === types.PONG) {
return ({
...state,
pong: (state.pong || 0) + 1,
});
}
return state;
};
export default reducer;
//# sourceMappingURL=reducers.js.map