Practically every desktop UI works that way (Windows API, X Windows, Java UI libs). It's funny to see how web programming in 2015 slowly reinvents the wheels known since 1970s.
Practically every desktop UI works that way (Windows API, X Windows, Java UI libs). It's funny to see how web programming in 2015 slowly reinvents the wheels known since 1970s.
So it's kinda funny that the modern state of web dev is adding another layer of that same approach on top of layers of that approach.
freeze()
doLotsOfUpdates()
thaw()
So one would have to reinvent this. Kind of reminds of propeties in some languages, runtimes and their UI's: someForm.setWidth(500); // And it's updated right away on the screen, instead of being deferred, or put in some freeze()/thaw() mode. (disableUpdates() / enabledUpdates()).When we modify DOM it becomes "dirty", and after our script finishes, reflow/re-render happens. But also, if our script queries DOM properties, like elem.clientHeight, DOM may need to perform the calculations in order to return us correct values, reflecting all the recent property changes. For example, if we access element.clientHeight browser may need to calculate re-flow (I recently encountered very slow clientHeight calculation by FireFox).
So, if we only modify DOM properties, all the re-rendering is deferred till the end of script.
Google about "DOM reflow"
I suppose that's the value proposition of React Native; write your javascript logic once and just rewrite the render function for Android, iOS, web, any any future target that implements the API.
It's possibly missing this "mode" because of other factors (what if you never put it back in "updates enabled" mode?)