Skip to content

Instantly share code, notes, and snippets.

View pearcircuitmike's full-sized avatar
🤨
Learning

Michael Young pearcircuitmike

🤨
Learning
View GitHub Profile
@pearcircuitmike
pearcircuitmike / Todos.jsx
Last active April 18, 2022 19:31
Not getting id from firebase UseCollections
import "../App.css";
import {useState} from "react";
import {auth, firestore} from "../firebase";
import firebase from "../firebase";
import {useCollectionData} from "react-firebase-hooks/firestore";
const Todos = () => {
const [todo, setTodo] = useState("");
const todosRef = firestore.collection(`users/${auth.currentUser.uid}/todos`);
const [todos] = useCollectionData(todosRef, { idField: "id" });