oguzhan18/angular-ecosystem-skills

rxjs

ALWAYS use when working with RxJS Observables, operators, and reactive patterns in Angular applications.

First seen Apr 2, 2026

Installation

$ npx skills add oguzhan18/angular-ecosystem-skills --skill rxjs

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from oguzhan18/angular-ecosystem-skills · top by installs.

npx skills add oguzhan18/angular-ecosystem-skills

Browse all from oguzhan18/angular-ecosystem-skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 7
License LICENSE
Default branch main
Open issues 0
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

Version8.0.0
More metadata
version
8.0.0
generated_by
oguzhancart
generated_at
2026-02-19

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 3,021 B
  • docs SUMMARY.md 113 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 204 installs

SKILL.md

RxJS (Reactive Extensions for JavaScript)

Version: 8.x (2025) Tags: Reactive Programming, Observables, Async

References: Docs — operators, API • Angular RxJSGitHub

API Changes

This section documents recent version-specific API changes.

  • NEW: RxJS 8 — Modern TypeScript types, smaller bundles, better tree-shaking source
  • NEW: Improved interop helpers — Simpler conversion to/from Signals with toSignal and toObservable
  • NEW: RxJS 8 ergonomics — Compact operator signatures and safer defaults
  • DEPRECATED: Legacy import style — Use RxJS 7+ pipeable operators instead of patch imports

Best Practices

  • Use AsyncPipe in templates — Handles subscription/unsubscription automatically, prevents memory leaks
@Component({
  template: `
    <div *ngIf="data$ | async as data">
      {{ data.name }}
    </div>
  `
})
export class MyComponent {
  data$ = this.service.getData();
}
  • Use proper flattening operators — Choose based on use case:
// switchMap - cancel previous, keep latest (search)
search(term: string): Observable<SearchResult[]> {
  return this.searchService.search(term).pipe(
    debounceTime(300),
    distinctUntilChanged(),
    switchMap(term => term ? this.http.get(...) : of([]))
  );
}

// mergeMap - run concurrently (multiple API calls)
this.items$.pipe(
  mergeMap(item => this.save(item))
);

// concatMap - run sequentially (order matters)
this.orders$.pipe(
  concatMap(order => this.processOrder(order))
);

// exhaustMap - ignore while running (form submit)
this.submit$.pipe(
  exhaustMap(() => this.submitForm())
);
  • Always unsubscribe — Prevent memory leaks
// Use takeUntil pattern
private destroy$ = new Subject<void>();

ngOnInit() {
  this.data$.pipe(takeUntil(this.destroy$)).subscribe();
}

ngOnDestroy() {
  this.destroy$.next();
  this.destroy$.complete();
}

// Or use takeUntilDestroyed (Angular 16+)
private destroy$ = takeUntilDestroyed();
  • Use catchError for error handling
this.http.get('/api/data').pipe(
  catchError(error => {
    console.error(error);
    return of([]); // Return fallback value
  })
);
  • Use shareReplay(1) for caching shared observables
this.data$ = this.http.get('/api/data').pipe(
  shareReplay(1)
);
  • Name observables with $ suffix — Improves readability
  • Use Signals for UI state, RxJS for events — Modern Angular pattern
// Convert Observable to Signal
users = toSignal(this.users$, { initialValue: [] });

// Convert Signal to Observable (if needed)
name$ = toObservable(this.name);