Created
May 4, 2020 19:04
-
-
Save Odonno/5868d71a0e995c0e1c4bf64f72743321 to your computer and use it in GitHub Desktop.
fromStream.ts
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
// listen to realtime event | |
fromStream<number>(connection, "realtimeWeather") | |
.subscribe({ | |
next: value => setWeather(value), | |
error: err => displayUserError(err), | |
complete: () => console.log('No more weather?') | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment