Is there any equivalent for
window.addEventListener('unhandledrejection', (event) => {});
in React Native?
I know I could wrap the fetch api to handle most of the unhandledrejection events in a single place but the global handler would help with any promise not only the one coming from the fetch api.
This is not an easy issue.
The "unhandledrejection" event is not yet supported by all browsers (see browser compatibility on MDN). And the default React Native's Promises implementation has another mechanism to catch unhandled rejections (see here).
If you want the functionality anyway (I wanted it also myself!), you can use a JS Promise library that implements it. Bluebird is a good example. But then you have to make sure every Promise in your app uses this implementation.
For example, in the index.js file of your React Native app: