What is the React.AsyncComponent class?

When I was looking at the React source code, I came across a base class called " AsyncComponent ". This is new to me, unlike the popular base classes Component and PureComponent. I was wondering what it was and if, how and where it is used to better understand it.

+5
source share
1 answer

This is an alternative to using the static class unstable_asyncUpdates property. Inside the default async update.

As I understand it, you can achieve the same result using ReactDOM.deferredUpdates .

But the main problem is that asynchronous rendering is not ready yet, and it will be available later.

Quote from v16 release notes:

We believe that asynchronous rendering is a big deal and represents the future of Reagent. To make the migration to v16.0 as smooth as possible, some async features have not yet been activated, but were happy to begin deploying them in the coming months. Stay with us!

+1
source

Source: https://habr.com/ru/post/1274235/


All Articles