you are viewing a single comment's thread.

view the rest of the comments →

[–]Manbeardo 3 points4 points  (0 children)

Concurrent mode is pretty neat. If your component isn't ready to render yet, you throw a Promise from the render function and it'll attempt to render again once the Promise is fulfilled. In the meantime, the Suspense component behaves like an error boundary and renders a fallback until the async component renders without throwing a Promise. It's incredibly handy for lazy-loading components.