Yeap sure !!
firebase.database().ref() simply reference a specific location in your database that can be used for reading and writing data to that particular Database location and also you can use "on()" and "once()" either of these methods to read data at a path and listen for any changes ....and after that, we are simply passing the callback which filters the value and sends / updates to our main state.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hey can you please explain what this line of code is doing.
firebase
.database()
.ref("notebook")
.on("child_removed", (snapshot) => {
let notebook = noteBookData;
notebook = noteBookData.filter((note) => note.id !== snapshot.key);
setNoteBookData(notebook);
});
};
Yeap sure !!
firebase.database().ref() simply reference a specific location in your database that can be used for reading and writing data to that particular Database location and also you can use "on()" and "once()" either of these methods to read data at a path and listen for any changes ....and after that, we are simply passing the callback which filters the value and sends / updates to our main state.