4 ms·
The primary example code relies on Suspense, meaning that loading behavior will be handled by a parent/ancestor <Suspense /> component and not in the component
by merrywhether 5y ago
The primary example code relies on Suspense, meaning that loading behavior will be handled by a parent/ancestor <Suspense /> component and not in the component itself. I think they default to showing this pattern since it is the “future” of React. There is an alternate version of the API where you can get a loading boolean for imperative control.