Created
December 14, 2017 18:48
-
-
Save abinavseelan/4fa46a01e07417c58f47ef14dafd575a to your computer and use it in GitHub Desktop.
onDisconnect() Firebase Real Time Database example
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 oldRealTimeDb = firebase.database(); | |
| oldRealTimeDb | |
| .ref('/some/random/key') // Making a reference to a key-value pair in the old real-time database structure | |
| .onDisconnect() // Setting up the onDisconnect hook | |
| .set('This string will be set for the referenced key once the client disconnects!'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment