Skip to content
Discussion options

You must be logged in to vote

For this use case, my suggestion would be just using setTimeout. In VanJS, DOM elements are updated right after state changes with setTimeout(...) where the delay is implicitly 0. Thus technically any setTimeout calls with greater than 0 delay would just work. We are leveraging this technique in several occasions in VanJS's sample code. For instance:

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Tao-VanJS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants