-
Hiya again, Van gang, I have some custom "onDataRefreshed(newData)" function where I first do various state updates by Those latter non-state data2ui syncs depend on the former If I put that latter "manual" (non-van) portion of my data2ui syncing into a But that's ugly and indicative of me missing something. But there also isn't some |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
For this use case, my suggestion would be just using
|
Beta Was this translation helpful? Give feedback.
For this use case, my suggestion would be just using
setTimeout
. In VanJS, DOM elements are updated right after state changes withsetTimeout(...)
where thedelay
is implicitly0
. Thus technically anysetTimeout
calls with greater than0
delay
would just work. We are leveraging this technique in several occasions in VanJS's sample code. For instance:<textarea>
element to be updated before adjusting its size.<textarea>
element.setTimeout(...)
to integrate with Google Charts, and scroll the new in…