rxjs
Installation
SKILL.md
RxJS Skill
Best Practices
1. Observable Creation
- Use appropriate creation operators (of, from, interval, etc.)
- Prefer cold observables for most use cases
- Use subjects sparingly and with clear intent
- Document whether an observable is hot or cold
2. Subscription Management
- Always unsubscribe to prevent memory leaks
- Use takeUntil pattern with destroy$ subject
- Prefer async pipe in templates (auto-unsubscribes)
- Use takeWhile or first for self-completing observables