Asynchronous rendering

Suspense error recovery

Use an Error Boundary for rejected resources; reset the boundary and replace a failed resource when retrying.

Formal Syntax & Structure

react syntaxreact
<Boundary key={attempt}><Suspense fallback={<p>Loading</p>}><Record promise={resource}/></Suspense></Boundary>

Working Example

Example Snippetreact
<Boundary key={attempt}><Suspense fallback={<p>Loading</p>}><Record promise={resource}/></Suspense></Boundary>
React Reference