How to sync two different signals inside a store maybe
I have an array and an index to the array defined separately as two signals, here I've demonstrated:
.
Now when I update the array for example reset it, the cursor still shows the old location which causes an out of bounds error. How do I structure my code to prevent this kind of issue, and still be able to have a computation to access inside the array reactively.
https://playground.solidjs.com/anonymous/f3de692a-5ace-4a08-a51c-dc8541ec0b85
.
Now when I update the array for example reset it, the cursor still shows the old location which causes an out of bounds error. How do I structure my code to prevent this kind of issue, and still be able to have a computation to access inside the array reactively.
https://playground.solidjs.com/anonymous/f3de692a-5ace-4a08-a51c-dc8541ec0b85
Quickly discover what the solid compiler will generate from your JSX template
