-
Notifications
You must be signed in to change notification settings - Fork 407
Open
Description
Description
With NGXS v18, we have started to push towards better type safety for selectors.
The challenge is that we have users who use old mechanisms that are not type-safe and they would need guidance on converting their code to a more type-safe equivalent. Not only that, but there is an opportunity here to showcase all of the different helpers available.
We should definitely cover:
- Use a StateToken instead of the State Class to select from a state
- and the alternative of using
createSelectorwith some type casting to wrap an existing State Class as a type-safe selector
createSelector([MyState], s => s as MyStateModel)
- and the alternative of using
- Using
createPropertySelectorsto create smaller slices of your state - Using
createPickSelectorto optimise a selector that has fewer dependencies - Using
createMappedSelectorto combine selectors for view models, etc.
profanis, WillBoig, laurentsd, jzgoda and kingpeti
Metadata
Metadata
Assignees
Labels
No labels