@bumped-inc/react-suspense-polyfill v0.1.1
@bumped-inc/react-suspense-polyfill
Polyfill for React Suspense and Concurrent Mode
This is a package that hopefully has a short lifetime, as it will become obsolete once React Concurrent Mode is released to the public.
See https://reactjs.org/docs/concurrent-mode-intro.html for official documentation.
react
is marked as a peer dependency and not a direct dependency, and by using
this package, the version of React that is installed will be utilized. If using
a version of React that natively supports Concurrent mode, the official
implementation will be used rather than a polyfilled version. It is expected to
use ReactDOM.createRoot
or ReactDOM.createBlockingRoot
instead of
ReactDOM.render
if available.
<Suspense>
Suspense
has been supported (even outside of Concurrent Mode) since React
16.6. Because of this, it is not polyfilled, though it is re-exported by this
package for ease of use.
<SuspenseList>
SuspenseList
controls how two or more Suspense
elements are rendered. See
https://reactjs.org/docs/concurrent-mode-patterns.html#suspenselist for more
details. The polyfilled version renders all children immediately and does not do
any special handling aside from rendering the passed-in children.
useDeferredValue
See https://reactjs.org/docs/concurrent-mode-patterns.html#deferring-a-value
useTransition
See https://reactjs.org/docs/concurrent-mode-patterns.html#transitions
4 years ago