Description
This is a...
- usage question
What toolchain are you using for transpilation/bundling?
- angular/cli
I've got 2 questions regarding fractal store setup:
1. Fractal store article implies that it has to be defined on component level (https://github.com/angular-redux/store/blob/master/articles/fractal-store.md). Can it be configured on module level so no additional code in each component is required or does it have to be configured for each component?
2. How can I supply initial state for fractal store? I need this specifically for lazy loaded modules that come from separate npm packages.
Scenario is:
- main redux store is configured on host application level
- user navigates to specific route, feature that will have it's own fractal store is lazily loaded
- I would like to supply initial state for this fractal store from lazily loaded module
This way host application doesn't need to know about state of this lazily loaded feature upfront which is important to keep separation of concerns between host/feature package and avoids adding initial state for something that potentially won't be used.