DEV Community

Discussion on: Chatting with Sapper (Svelte) and Socket.IO

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