feat(effects-ng): prefer classes from "effects" as injection tokens #67
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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?
Currently we intentionally create new tokens for providers even if the provider is an existing concept in the core package and there is an available class in the core package to use as an injection token.
This intentional design might bring some benefits, but it might be more beneficial to simply use the existing classes from the core package as injection tokens.
In most cases, the user installs both
@ngneat/effects
and@ngneat/effects-ng
. When the user hope to injectActions
, the first option suggested by the IDE is sometimes the one from@ngneat/effects
(tested in VS Code), which might cause confusing runtime injection errors as it is not easy to notice.Besides, this also enables access to the provided
EffectsManager
instance, which can be quite useful when the user wants to create wrappers upon this library, as stated in #66.Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information