Click in order · JavaScript and React course · Module 16: Error Handling and Suspense
Using useErrorBoundary in Async Code
Click elements in order for using useErrorBoundary with fetch:
Items to click
- catch (error) { showBoundary(error) }
- const { showBoundary } = useErrorBoundary()
- try { await fetch(url) }
You can check the correct answer by solving this task in the CodeWorlds game.