Closed jeevasusej closed 3 years ago
Sorry, the mistake is mine. Dynamic Module Loader concept is "When component is unmounted, the module will be removed from the store and the state will be cleaned up". So the logic is working as expected. I have used moduleStore.addModule(createModuleA()); instead of dynamic module loader. The concept is working as expected.
I am using DynamicModuleLoader. When I move one component/module to another component/module (one route to another route), I lost state from the redux store which already loaded. This makes me not to use the feature of redux (where we have one store shared through out the application). What should I do to maintain redux state once loaded?
We can see that, whenever route change the state has been reset. The store doesn't retain the old state. The state has been added and removed automatically.