display data from firebase in react native 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);
})
}
}