Hey, I’m trying to make a feature where the user can ‘like’/‘upvote’ something (a post) only once, the procedure is :
is clicked ‘true’?
if no user clicks the button
clicked = true
the problem that I have, is that ‘clicked’ resets (after exiting the post [modal]) and doesn’t hold his value.
How do I overcome this? Do you have any efficient ideas that can replace this?
I’m using firebase btw .