Closed SethDavenport closed 6 years ago
When I use composerReducers
as in the docs I get this warning. Still works though.
+1 on the warning, would love to get rid of it.
For anyone who would like to remove the warning, for now, a workaround I use is to include the property name in the combineReducers
map object with a pass through reducer function, like this:
// Use whenever you need to declare a form reducer path prop
export const formReducer = (state = {}) => state;
const rootReducer = combineReducers({
reducerA,
reducerB,
myForm: formReducer,
});
Thanks for the work around for the console message. I believe that the initial intent of the function was to be able to wrap your entire state so that the selector for connect
could merge with any portion of the state tree. I don't see this being a particularly safe or common practice as usually one would want to isolate the state of a form under a top-level property, in which case combineReducers
would be all you would need. A more simple formsReducer API is forthcoming.
angular-redux/form
exposes acomposeReducers
function. Can you elaborate on what this does that isn't normally handled via Redux's existingcombineReducers
?