dfilatov / vidom

Library to build UI based on virtual DOM
MIT License
415 stars 16 forks source link

[Q] is update() synchronous? #9

Closed gaydenko closed 9 years ago

gaydenko commented 9 years ago

Hi! Documentation says:

update()
Forces to schedule component update.

Usually the word "schedule" is used to denote asynchronous nature. What does it mean at the vidom context?

dfilatov commented 9 years ago

Yes, it's asynchronous. "update" actually calls "onRender", calculates patch and if it's not empty, schedules DOM update until the next "onRequestAnimationFrame".

gaydenko commented 9 years ago

I see, thanks.