Setting Up the Selectors
Explore how to create NgRx selectors to access specific slices of your application's state. Learn to use createFeatureSelector and the select function to subscribe to data changes and update components seamlessly.
We'll cover the following...
We'll cover the following...
Introduction to NgRx selectors
A reducer’s job is to update the store with the new data. To retrieve this new data from the store and display it in the component, NgRx provides selectors.
NgRx provides the createFeatureSelector() function to create a selector. The createFeatureSelector() function takes in a string as its argument.
This string defines which slice of the store we are interested in. It returns the specified slice of the store.
The Angular components use the select() function to ...