You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: Objects are not valid as a React child (found: object with keys {seconds, nanoseconds}). If you meant to render a collection of children, use an array instead.
#37
Open
THEORIGINITE opened this issue
Feb 3, 2021
· 0 comments
The text was updated successfully, but these errors were encountered:
THEORIGINITE
changed the title
function Feed() { const [posts,setPosts] = useState([]); 10 | useEffect(() => { > 11 | db.collection("posts").onSnapshot((snapshot)=> 12 | setPosts(snapshot.docs.map((doc)=>({id:doc.id,data:doc.data()}))) 13 | );
Error: Objects are not valid as a React child (found: object with keys {seconds, nanoseconds}). If you meant to render a collection of children, use an array instead.
Feb 3, 2021
` const [posts,setPosts] = useState([]);
useEffect(() => {
db.collection("posts").onSnapshot((snapshot)=>
setPosts(snapshot.docs.map((doc)=>({id:doc.id,data:doc.data()})))
);
}, [])`
The text was updated successfully, but these errors were encountered: