-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(effects): add provideEffects function #3524
feat(effects): add provideEffects function #3524
Conversation
✅ Deploy Preview for ngrx-io canceled.Built without sensitive environment variables
|
8e547f0
to
a011fe6
Compare
useValue: () => { | ||
const effectsRunner = inject(EffectsRunner); | ||
const effectSources = inject(EffectSources); | ||
const shouldInitEffects = !effectsRunner.isStarted; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use a provider token here that checks to see if there is a parent token above this injector. If not then start the effects and we don't have to use property on the class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure it would work when provideEffects
is called multiple times within the context of the same injector.
639ed71
to
3898d51
Compare
3898d51
to
e4f5767
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
🚀🚀 |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Closes #3522
What is the new behavior?
Does this PR introduce a breaking change?