Firebase bekommen das letzte Dokument
//using React
//Make sure to import and initialize your Firebase App
const firestore = firebase.firestore();
const collection = firestore.collection("myCollection");
const { documentData, setDocumentData } = useState({});
const getDocument = () => {
collection.get()
.then((snapshot) => {
setDocumentData(snapshot[0].data());
});
}
useEffect(() => {
getDocument();
}, []);
Q_Q