All Questions
2 questions
0
votes
0
answers
64
views
React State Update Not Reflecting Immediately in Conditional Rendering
I am working on a React component where I need to select an item from a list and update the state with the selected item's ID. I then want to conditionally render the selected item. However, I am ...
2
votes
1
answer
1k
views
How do I use like & unlike functionality on every element while using map to render those elements?
I have social media posts stored in firebase and each post has a like button. I am using map() function to render those posts but I have declared a single state for like button using useState().
When ...