I'm referring to this example: https://www.wix.com/corvid/example/custom-like-button
At the time of writing this; if click the like button there is a delay in response.
If you click it again multiple time you gonna be surprised of the result.
Instead of making the like count going up , it goes down.
Yet in this is example beforeInsert was used in the backend, duplicate entry was not prevented.
I face this problem with other API as wixData (query, getCurrentItem,...)
I try setTimeout and chaining promises to avoid this issue but didn't workout for me. Is there a way to solve the issue?
Hey @Abdullah A. Alnabi,
I'm not able to recreate the issue. Can you provide some more details? What browser are you using? What exactly happens when you click multiple times?
Expected behavior is that the like count increases by 1 on the first click (adding your like) and decreases by 1 when you click again (removing your like). If you click multiple times, it should cycle through adding and subtracting 1 to the count.
I'm looking into this.