Resources
1Install
npx skillscat add hoangnguyen0403/agent-skills-standard/rxjs-interop Install via the SkillsCat registry.
SKILL.md
RxJS Interop
Priority: P1 (HIGH)
Principles
- Async to Sync: Use
toSignalto convert Observables (HTTP, Events) to Signals for template rendering. - Sync to Async: Use
toObservablewhen you need RxJS operators (debounce, switchMap) on a Signal. - Auto-Unsubscribe:
toSignalautomatically unsubscribes. - Cleanup: Use
takeUntilDestroyedfor manual subscriptions in injection contexts.
Guidelines
- HTTP Requests:
- GET:
http.get().pipe(...)->toSignal() - POST/PUT: Trigger explicit subscribe() or lastValueFrom().
- GET:
- Race Conditions: Handle async loading states.
toSignalrequires aninitialValueor handlesundefined.