4 ms·
Redux gives you a combineReducers() function for splitting your reducers into separate files. The way I structure it is by which section of the state object the
by rhinoceraptor 10y ago
Redux gives you a combineReducers() function for splitting your reducers into separate files. The way I structure it is by which section of the state object they modify, so that I have a reducers/stateA.js, reducers/stateB.js, which correspond to a state object that looks like { stateA: { ... }, stateB: { ... } }.