Quick Answer
NgRx building blocks: Store (single source of truth - the state tree), Actions (events describing what happened), Reducers (pure functions that compute new state from action + previous state), Selectors (pure functions to derive/slice state), Effects (handle side effects like HTTP calls, triggered by actions, dispatch new actions). Unidirectional data flow: component dispatches action -> reducer updates store -> component reads selector.
Answer
NgRx uses a predictable data flow:
Actions: Describe events
Reducers: Update state immutably
Store: Holds global state
Selectors: Retrieve computed data
Effects: Handle async operations
The flow is: Actions ? Reducers ? Store ? Selectors ? Components ? Effects ? new Actions.
S
SugharaIQ Editorial Team
Verified Answer
This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.