How to trigger React error boundaries when Promises are rejected? How to trigger React error boundaries when Promises are rejected? reactjs reactjs

How to trigger React error boundaries when Promises are rejected?


You can try react-error-boundary npm package. They have useErrorHandler hook to handle asynchronous code.

Please see this page for more info - https://github.com/bvaughn/react-error-boundary#useerrorhandlererror-error