Created
October 16, 2020 02:56
-
-
Save LironHazan/a4a41ee729f924547a9bc709c18c7445 to your computer and use it in GitHub Desktop.
Gal Falah's example for rxjs post
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
notNullish<T>(input: null | undefined | T): boolean { | |
return input !== null && input !== undefined; | |
} | |
registerToggleCall() { | |
Interactor.onTogglingSomthing() | |
.pipe(distinctUntilChanged(), filter(this.notNullish)) | |
.subscribe((_state: boolean) => { | |
this.state = _state; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment