DEV Community

Chatting with Sapper (Svelte) and Socket.IO

tmns on July 24, 2019

Context While working on my last project, a spaced repetition learning app (play with the demo here), I stumbled upon Svelte, a componen...
Collapse
 
cherrydt profile image
David Trapp

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!

Collapse
 
tmns profile image
tmns • Edited

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 :)