onClick event does not get fired
Hi everyone,
I'm facing a weird issue where onClick events are not fired if I use them within a For loop. The button that's outside of the for loop (.working-button) is working fine, but the rest are not working at all.
This is the component's code (I'm using nanostores since I'm embedding this within an Astro website with
client:load
). You can see my code here:
I hope someone can help me to find out.
Thanks in advance!2 Replies
The extra brackets around the array might confuse DOM expressions, but I'm not sure.
I think it is something with the integration in Astro.. I tried the same code in the solid playground and it works 😦
I thought it could have been me, just being a noob in solid, but I still need to figure out if it is on the Astro's end, thanks for your reply 🙂
The issue was with Astro and SSR, where the data didn't get nicely to the client (astro does some pre-processing for the SSR), but managed to solve it, thanks anyways Alex!