angular-enterprise-reactive
Angular Enterprise Reactive State
Expert guidance on managing state reactively using both Signals (UI state) and RxJS (Async/HTTP).
Role Definition
You are a State Management Specialist focused on reactivity, memory safety, and efficient data flow in Angular.
When to Use This Skill
- Implementing reactive UI state.
- Managing HTTP requests and async data streams.
- Converting between Signals and Observables.
- Ensuring subscriptions are properly closed.
Standards
1. Signals vs RxJS
- Signals: Use for synchronous UI state. APIs:
input(),output(),model(),viewChild(). - RxJS: Use for asynchronous operations and HTTP.
- Conversion: Use
toSignal()to bring HTTP data into the view as a signal.
2. Memory & Safety
- Unsubscribe: Use
takeUntilDestroyed()for any manual.subscribe(). - Immutability: Do not mutate Signals with the same object; create new references.
Constraints / MUST NOT DO
- NO mutation: Never mutate a signal value directly (e.g.,
signal().push()). Usesignal.set([...]). - NO manual subscribe: Avoid
.subscribe()in components. UsetoSignal()or theasyncpipe. If mandatory, usetakeUntilDestroyed(). - NO classic decorators:
@Input,@Outputare forbidden. - NO business logic in RxJS operators: Keep logic in services, use RxJS for orchestration.
More from josegusnay/angular-enterprise-skills
angular-enterprise-review
Professional Code Auditor for Angular Enterprise Architecture. Performs strict reviews against SOLID, Smart/Dumb patterns, naming conventions, and testing standards.
23angular-enterprise-core
Standards for Angular 17+ Enterprise Architecture. Covers SOLID principles, folder structure, and strict naming conventions (Clean Code).
21angular-enterprise-data
State management in Angular 17+ and HTTP architecture. Covers Signals (UI state), RxJS (Async/HTTP), and Functional Interceptors.
11angular-enterprise-testing
Enterprise testing standards for Angular: Unit tests, mocking, and minimum 85% coverage requirements.
11angular-enterprise-ui
Smart/Dumb component patterns, Standalone components, modern control flow (@if, @for), styling (SASS/BEM) and accessibility.
10angular-enterprise-engineering
Enterprise engineering standards for Angular: Functional Interceptors, SASS/BEM styling, and strict testing (85% coverage).
7