QUICK GET STARTED WITH NGXS
What is NGXS
NGXS
is a state management pattern + library for Angular. It acts as a single source of truth for your application’s state, providing simple rules for predictable state mutations.
NGXS
is modeled after the CQRS
pattern popularly implemented in libraries like Redux
and NGRX
but reduces boilerplate by using modern TypeScript features such as classes and decorators.
Adding to an Angular Project
Installing Requirements
Core
Debugging Plugin
Storage Plugin
Adding to an root app module
app.modules.ts | |
---|---|
Note
It is recommended to register the storage plugin before other plugins so initial state can be picked up by those plugins.