System of likes or hearts

You Have To Use 2nd Way For That

For Example If I Have 10 Hearts In Database So We Need To Store It Some Where In Variables Or In Label Or In TinyDB

When User Click On Heart icon You Have To Increase It By Adding(+) 1 So It Will Be 11 And When User Click It Again So You Need To Decrese It By Minasing (-) 1 So It Will Be 10

Ps ::
You Need To Store Total Clicks Not Click

Click Is For Detecting How Much Time User Clicked

1 Like