Skip to content

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

@THEORIGINITE

Description

@THEORIGINITE

` const [posts,setPosts] = useState([]);
useEffect(() => {
db.collection("posts").onSnapshot((snapshot)=>
setPosts(snapshot.docs.map((doc)=>({id:doc.id,data:doc.data()})))
);

}, [])`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions