Skip to main content

NgRx: Actions, Reducers, Effects and Selectors

Learn NgRx: Actions, Reducers, Effects and Selectors (Phase 11 · State Management (Core), Angular) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

The NgRx flow • NgRx is Redux for Angular, built on RxJS. One Store holds the state tree. Components dispatch actions (events describing what happened); reducers (pure functions) compute the new state; selectors read slices; effects handle side effects such as HTTP and dispatch new actions. • Install: ng add @ngrx/store @ngrx/effects @ngrx/store-devtools . Standalone setup: provideStore() , provideEffects() , provideState() for feature slices. • Benefits: predictable updates, time-travel debugging (Redux DevTools), testable pure functions. Cost: boilerplate.

More lessons in Phase 11 · State Management (Core)