NgRx Selectors
Explain createSelector's memoization and composition benefits over reading state directly from the store.
Selectors are the recommended, and effectively mandatory-in-practice, way to read state out of an NgRx store — rather than components reaching directly into the raw state shape (store.select(state => state.products.items)), createSelector builds composable, memoized query functions that decouple components from the store's internal state structure and avoid redundant recomputation of derived values.
It's like a company's official reporting dashboard that pulls from raw underlying databases through a defined, stable API — analysts consuming the dashboard never need to know if the underlying database schema changes, and the dashboard only recalculates its summary figures when the relevant raw numbers actually change, not on every single page refresh.