in react app is it efficient to retrive data from firebase or we should save it in file code example
Example: storing data firebase react
function addTodo(itemTitle){
firebase.database.ref('todos').push().set({
title: itemTitle
})
.then((doc) => {
// nothing to do here since you already have a
// connection pulling updates to Todos
})
.catch((error) => {
dispatch(todoActions.showError("Error adding Todo to database"));
console.error(error);
})
}
}