-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(signals): rename
rxMethod.unsubscribe
to destroy
BREAKING CHANGES: The `unsubscribe` method from `rxMethod` is renamed to `destroy`. BEFORE: const logNumber = rxMethod<number>(tap(console.log)); const num1$ = interval(1_000); const num2$ = interval(2_000); const num1Ref = logNumber(num1$); const num2Ref = logNumber(num2$); // destroy `num1Ref` after 2 seconds setTimeout(() => num1Ref.unsubscribe(), 2_000); // destroy all reactive method refs after 5 seconds setTimeout(() => logNumber.unsubscribe(), 5_000); AFTER: const logNumber = rxMethod<number>(tap(console.log)); const num1$ = interval(1_000); const num2$ = interval(2_000); const num1Ref = logNumber(num1$); const num2Ref = logNumber(num2$); // destroy `num1Ref` after 2 seconds setTimeout(() => num1Ref.destroy(), 2_000); // destroy all reactive method refs after 5 seconds setTimeout(() => logNumber.destroy(), 5_000);
- Loading branch information
1 parent
de3ebce
commit bf7e22f
Showing
3 changed files
with
27 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters