PHP enthusiast, passionate about quality tools, AI exploration, and sharing knowledge through articles. Automation is my playground; I’m always learning, innovating, and pushing boundaries.
Thank you for the feedback.
Managing arrays as a state is something that I'm exploring more in order to identify the "best way" to manage them.
For example, i want to replace adding item into an array with :
PHP enthusiast, passionate about quality tools, AI exploration, and sharing knowledge through articles. Automation is my playground; I’m always learning, innovating, and pushing boundaries.
With the new features of Svelte5 and the new reactivity mechanism, it is no longer necessary to reassign the array. An array is "reactive" if it is initialized with $state, and you can use the push method to append elements. (see the draw() function)
dicecould be downstream fromrollsThis is how I'd do it in the next version of StateAdapt
Just an idea. Probably on dangerous ground with the $state keyword. But it works
Thank you for the feedback.
Managing arrays as a state is something that I'm exploring more in order to identify the "best way" to manage them.
For example, i want to replace adding item into an array with :
I will monitor the side effects.
I want to explore more "Fine grained reactivity" https://www.youtube.com/watch?v=gGwnF-lxS_Q&t=313s
With the new features of Svelte5 and the new reactivity mechanism, it is no longer necessary to reassign the array. An array is "reactive" if it is initialized with
$state, and you can use the push method to append elements. (see thedraw()function)For my own future reference svelte-5-preview.vercel.app/#H4sIA...