Skip to content

Commit 89ee2c1

Browse files
authored
Merge pull request #82 from Microsoft/alebet/fixSeedReducers
Seed all reducers at once
2 parents 8996551 + ceee2df commit 89ee2c1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/redux-dynamic-modules-core/src/Managers/ModuleManager.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@ export function getModuleManager<State>(
7373
_reducerManager.add(key, reducerMap[key]);
7474
}
7575
}
76-
77-
/* Fire an action so that the newly added reducers can seed their initial state */
78-
_seedReducers();
7976
};
8077

8178
const _removeReducers = (
@@ -122,6 +119,9 @@ export function getModuleManager<State>(
122119
}
123120
});
124121

122+
/* Fire an action so that the newly added reducers can seed their initial state */
123+
_seedReducers();
124+
125125
// add the sagas and dispatch actions at the end so all the reducers are registered
126126
justAddedModules.forEach(module => {
127127
// Let the extensions know we added a module

0 commit comments

Comments
 (0)