-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support for nested reducers #160
Comments
If we take example from docs you're suggesting, what would the final structure of the store look like? |
import { combineReducers} from '@reduxjs/toolkit';
interface ICountersState {
counters: number;
};
interface IOrdersState {
orders: number;
};
interface IMeState {
me: {
counters: ICountersState;
orders: IOrdersState;
}
};
const counters = (state, action) => { // your reducer for counters };
const orders = (state, action) => { // your reducer for orders };
const meModule: IModule<IMeState> = {
id: 'me',
reducerMap: {
me: combineReducers({ counters, orders })
}
}; @PhilippMelnikov give it a try and let me know. |
I just added support for this via lodash.set paths in this PR: #195 |
Hello!
Does the library provide support for loading nested reducers? Suppose i have a store structure like this
{
auth,
me: {
counters,
orders
}
}
I want to load reducers for orders later. How do I do that?
The text was updated successfully, but these errors were encountered: