From the course: Reactivity and Signals in Angular
Unlock this course with a free trial
Join today to access over 24,800 courses taught by industry experts.
Signals-based state management - Angular Tutorial
From the course: Reactivity and Signals in Angular
Signals-based state management
- [Instructor] Out of the box, Angular provides the tools we need to manage application state. Simple state management can be handled by passing props between components using inputs and outputs. Most applications quickly outgrow the style of state management. Managing state within components can cause bloated component classes. We also have to deal with persisting state after components are destroyed and passing state between components not directly related in the component tree. To share state between components and classes, we can leverage the power of angular dependency injection. Angular dependency injection allows us to create singleton services. This means that everything that consumes the service gets the same instance. This is useful when designing application state management because it means we have code that continues to exist even after components are destroyed. It also means that unrelated components can get the same state at the same time. We use reactive containers…