const docRef = await addDoc(collection(db, "posts"), {
name: "Vishesh",
description: "Graphic Designer | Web Designer",
message: input,
timestamp: serverTimestamp(),
})
console.log("Document written with ID: ", docRef.id);
setInput("");
}
How can i use above docRef.id to map my data with props to get it render on my browser ?
{posts.map(({ id, data: { name, description, message } }) => (
<Post
key={id}
name={name}
description={description}
message={input}
/>
