2 ms·
There are several layers of rendering at play: 1) Re-rendering virtual DOM content 2) Mutating the DOM to match that new virtual DOM 3) The browser actually
by _bxg1 7y ago
There are several layers of rendering at play:
1) Re-rendering virtual DOM content
2) Mutating the DOM to match that new virtual DOM
3) The browser actually drawing the new state of the DOM/styles
#1 is your JS code. #2 is covered opaquely by React and peers. #3 is traditionally covered opaquely by the web browser.
Those libraries typically focus on optimizing step #1. The OP is a way of giving hints to #3 when that becomes your bottleneck (which is really pretty rare, but when it happens, it's extremely nice to have a recourse).