You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However this does not work, since the EffectsModule.forFeature call would now be invalid using the * import. It is therefore required to place this single Initial effect in a separate file which feels a bit awkward.
I do find it weird to add a lifecycle to the functional effects.
After thinking on this for a while, what about moving the lifecycle hook to provideEffects?
That would help, but not the same. The cool thing about the OnInitEffect is that it only runs once, no matter how often it is provided in features. It was perfect for loading data for a feature for me. But we can always go back to using a concatLatestFrom(() => store.select(isLoaded)).
Which @ngrx/* package(s) are relevant/related to the feature request?
effects
Information
Is it possible to use
createEffect
to implement theOnInitEffects
interface to trigger initial effects?Describe any alternatives/workarounds you're currently using
No response
I would be willing to submit a PR to fix this issue
The text was updated successfully, but these errors were encountered: