[ ] Think about grabbing list data another way? Is it more optimal to use firebase code and is there a way to do this?
Would need to set a normalized item name in the database on submit
// Assume we have the following data in the Database:
{
"name": {
"first": "Ada",
"last": "Lovelace"
}
}
// Test for the existence of certain keys within a DataSnapshot
var ref = firebase.database().ref("users/ada");
ref.once("value")
.then(function(snapshot) {
var a = snapshot.exists(); // true
var b = snapshot.child("name").exists(); // true
var c = snapshot.child("name/first").exists(); // true
var d = snapshot.child("name/middle").exists(); // false
});
[x] Incorporate Hot Toast Componenets Details Here
Info from Alena:
Also,
I've learned yesterday cool thing: we can use 'react-hot-toast', it creates cute notifications which disappear by itself, so we don't need to use notifications and then clear it.
to install run 'npm add react-hot-toast'
import import toast, { Toaster } from "react-hot-toast" on the top of your page
insert '' inside return statement
and use toast.error(${itemName} already exists in your list!); where do you want it work
[ ] Convert normalize methods into a utility function and separate from component
[ ] Think about grabbing list data another way? Is it more optimal to use firebase code and is there a way to do this?
Would need to set a normalized item name in the database on submit
[x] Incorporate Hot Toast Componenets Details Here Info from Alena:
[ ] Convert normalize methods into a utility function and separate from component