Repository navigation
|
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 |
Replies: 1 comment
|
For this use case, my suggestion would be just using
|
For this use case, my suggestion would be just using
setTimeout. In VanJS, DOM elements are updated right after state changes withsetTimeout(...)where thedelayis implicitly0. Thus technically anysetTimeoutcalls with greater than0delaywould 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…