I am using <React.Suspense>
for data fetching like in this blog post.
From the react docs
Suspense lets your components wait for something before they can render.
And even better explained in this docs
React.Suspense
lets you specify the loading indicator in case some components in the tree below it are not yet ready to render
I have understood that a loading indicator specified as fallback prop in <React.Suspense>
is displayed if a component is not ready to render.
However I am not understanding how React is checking if a component is ready to render or not. According to this docs
As more data streams in, React will retry rendering, and each time it might be able to progress “deeper”.
Does this mean React also re-renders when data streams in from a network request?
And is <React.Suspense>
constantly checking if a component is ready to render or not?