ErrorBoundary reset() method
what is reset() supposed to do?
if you run this and getData() errors, it will be caught be ErrorBoundary and the fallback will be rendered
if you click the mutateDataAction button until getData() errors again, there will be an uncaught error
if you call the reset() method (onClick handler on the div) it just re-runs the fallback function
the docs say
The reset function will reset the error boundary and re-render the children.
if you call reset() then have getData() error again, it will not be caught
if you call reset() the children are not reran, the fallback is reran
what is the intended usage of reset()? and how can I make it to where multiple subsequent calls to getData() are handled properly if errors occur?0 Replies