Created
June 20, 2021 12:38
-
-
Save teyfix/b86a02af130c626030fb02b207d0d50f to your computer and use it in GitHub Desktop.
rxjs - unsubscribing subject
This file contains hidden or 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
| const subject = new Subject(); | |
| const subscription = subject.subscribe(value => console.log(value)); | |
| subject.next('foo'); | |
| subject.next('bar'); | |
| subscription.unsubscribe(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment