3 ms·
You can make it happen by rendering all components first as 'null' or placeholder <div> and pushing them on a queue. Then loop the queue with requestAnimationFr
by Geee 7y ago
You can make it happen by rendering all components first as 'null' or placeholder <div> and pushing them on a queue. Then loop the queue with requestAnimationFrame() and set a batch of components visible for every frame. You can give each component a cost so that each batch will fit in a frame. It's basically a simple component that you can wrap around components that you wish to render in the queue. I have been using a solution like this for a long time in production and it works great.
You can combine this with virtualization if you have lots of non-visible components.
- _bxg1 7y agoWe've done a bit of that, but at that point you're just rolling your own, highly-stateful version of Concurrent Mode.