Click in order · JavaScript and React course · Module 16: Error Handling and Suspense
ErrorBoundary with onReset and resetKeys
Click elements in order for ErrorBoundary syntax with resetting:
Items to click
- <ErrorBoundary
- resetKeys={[selectedId]}>
- FallbackComponent={ErrorFallback}
- onReset={() => setKey(prev => prev + 1)}
You can check the correct answer by solving this task in the CodeWorlds game.