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
I think the description here is wrong/outdated and contradicts itself?
One way to solve this problem is to turn off the injectContainerState selector option at root, state, or selector level. By default (in NGXS v3), the state is implicitly injected as the first argument for composite selectors defined within state classes. Turning off this setting prevents the container state from being injected as the first argument. This requires you to explicitly specify all arguments when you use the @selector([...]) decorator. Any parameterless @selector() decorators will still inject the state as an implicit argument. Note that this option does not apply to selectors declared outside of state classes (because there is no container state to inject).
injectContainerState is false by default now so there's no reason to write about turning it off (the description implies that it is set to true and you have to set it off)
...because of that, the state is no longer implicitly injected as the first argument for composite selectors defined within state classes by default
we are now by default required to explicitly specify all arguments when we use the @selector([...]) decorator
The text was updated successfully, but these errors were encountered:
Description
https://www.ngxs.io/concepts/select/optimizing-selectors
I think the description here is wrong/outdated and contradicts itself?
From what I understand based on https://www.ngxs.io/concepts/store/options and https://www.ngxs.io/concepts/store/options:
The text was updated successfully, but these errors were encountered: