I would like svelte to be more reactive, something like array.push could trigger render.
It is. Read about reactive statements. svelte.dev/docs#component-format-s...
As far as I understand, mutate methods like ‘array.push’ won’t trigger updates. Take a look there svelte.dev/tutorial/updating-array...
After push you may write like array = array 😉 This works and even is suggested by tutorials
array = array
Exactly! But my point is to avoid an additional assignment; I believe the comiler could do it.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
It is. Read about reactive statements. svelte.dev/docs#component-format-s...
As far as I understand, mutate methods like ‘array.push’ won’t trigger updates. Take a look there svelte.dev/tutorial/updating-array...
After push you may write like
array = array
😉 This works and even is suggested by tutorialsExactly! But my point is to avoid an additional assignment; I believe the comiler could do it.