top | item 22339768

(no title)

gluxon | 6 years ago

I believe this would eliminate many uses of large list rendering libraries (such as react-virtualized/react-window). That's pretty neat.

The same caveats seem to be present for strict containment mode though. The width/height of a strictly contained element wont't update if its contents change.

discuss

order

_bxg1|6 years 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).