SHARE
TWEET

Untitled

a guest Mar 19th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Backend {
  2.    getUsers(callback){
  3.       const database = firebase.database().ref('users/')
  4.       const onReceive = (data) => {
  5.           callback({
  6.              data
  7.           )}
  8.       }
  9.       database.on('child_added', onReceive)
  10.    }
  11. }
  12.  
  13. Backend.getUsers((data) => {
  14.    console.log(data)
  15. })
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top