8000 refactor(state): drop untilDestroyed operator by michaelbe812 · Pull Request #1838 · rx-angular/rx-angular · GitHub
[go: up one dir, main page]

Skip to content

refactor(state): drop untilDestroyed operator #1838

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 28, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
refactor(state): use map instead of deprecated mapTo
  • Loading branch information
michaelbe812 committed Jan 8, 2025
commit eeee73bd6a2bcaed2ce81fd4aaf96aa842b52a57
7 changes: 5 additions & 2 deletions libs/state/effects/src/lib/effects.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
import {
catchError,
filter,
mapTo,
map,
mergeAll,
share,
takeUntil,
Expand Down Expand Up @@ -165,7 +165,10 @@ export class RxEffects implements OnDestroy$ {
}
const effectId = RxEffects.nextId++;
const destroy$ = (this.destroyers[effectId] = new Subject<void>());
const applyBehavior = pipe(mapTo(effectId), takeUntil(destroy$));
const applyBehavior = pipe(
map(() => effectId),
takeUntil(destroy$),
);
if (fnOrObj != null) {
this.observables$.next(
from(obsOrSub).pipe(
Expand Down
Loading
0