I believe instead of the setTimeout the official solution would have been await tick() (check svelte.dev/tutorial/tick). Otherwise, very cool and helpful article!
Ooo thank you for letting me know about that! Indeed setTimeout felt rather hacky at the time, which should have been a clear indicator there was a better solution out there. I'm glad you found the article helpful tho! Hope you're making something cool with Svelte and the rest of the gang :)
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.
I believe instead of the setTimeout the official solution would have been
await tick()
(check svelte.dev/tutorial/tick). Otherwise, very cool and helpful article!Ooo thank you for letting me know about that! Indeed
setTimeout
felt rather hacky at the time, which should have been a clear indicator there was a better solution out there. I'm glad you found the article helpful tho! Hope you're making something cool with Svelte and the rest of the gang :)