The issue is caused by package @ngxs/store package
Is this a regression?
This issue has always been present, since the introduction of the feature.
Description
The createPropertySelectors utility checks that the provided selector is a valid selector.
This is great, but if the utility is used within a state class it fails this check (during ngDevMode) because the @State decorator has not yet added the selector metadata.
Affected Package
The issue is caused by package @ngxs/store package
Is this a regression?
This issue has always been present, since the introduction of the feature.
Description
The
createPropertySelectors
utility checks that the provided selector is a valid selector. This is great, but if the utility is used within a state class it fails this check (duringngDevMode
) because the@State
decorator has not yet added the selector metadata.🔬 Minimal Reproduction
https://stackblitz.com/edit/tptxd8-kxtgub?file=src%2Fapp%2Fcookie%2Fcookie.state.ts This reproduction runs the development mode angular server by default. You will see the error in the console of the preview window (when opened in a new tab).
If you run the production mode server, you will see no error and the app will work:
npm start -- -c=production
🔥 Exception or Error
Environment