This is the archived documentation for NgRx v7. Please visit ngrx.io to see documentation for the current version of NgRx.

What is NgRx?

NgRx is a framework for building reactive applications in Angular. NgRx provides state management, isolation of side effects, entity collection management, router bindings, code generation, and developer tools that enhance developers experience when building many different types of applications.

Core Principles

  • State is a single, immutable data structure.
  • Components delegate responsibilities to side effects, which are handled in isolation.
  • Type-safety is promoted throughout the architecture with reliance on TypeScript's compiler for program correctness.
  • Actions and state are serializable to ensure state is predictably stored, rehydrated, and replayed.
  • Promotes the use of functional programming when building reactive applications.
  • Provide straightforward testing strategies for validation of functionality.

Packages

  • Store - RxJS powered state management for Angular apps, inspired by Redux.
  • Store Devtools - Instrumentation for @ngrx/store enabling time-travel debugging.
  • Effects - Side effect model for @ngrx/store.
  • Router Store - Bindings to connect the Angular Router to @ngrx/store.
  • Entity - Entity State adapter for managing record collections.
  • Schematics - Scaffolding library for Angular applications using NgRx libraries.