Closed schuchard closed 2 years ago
Instead of changing the loading process, I think in the case where combined entity data comes back from a single API, that would be a PARTIAL custom use case. Handling such a use case is possible today. The developer would require a single initiating action and an effect to handle their aggregate load. That effect, in turn, would then be able to emit its own "intermediate" action containing the full aggregate. Additional effects can then handle the intermediate aggregate action, split out the entity data as appropriate, and dispatch the appropriate auto-entity entity-specific "loadSuccess" actions to get the entity data into state.
Back when this issue was first created, we did not quite have the custom set of per-entity actions in place yet. Now that we do, handling this scenario is much easier than it would have been in the past, much more natural with standard NgRx practices.
(
load
,loaded
,loadSuccess
). This would help to break out combined entity states from a single http response into multiple auto-entity states. Would also not run the loadSuccess meta-reducer for performance improvements.