I tried to implement error boundary by https://reactjs.org/docs/error-boundaries.html, but it catches only rendering errors.
It is possible to implement something like global try/catch on react
and catch errors also on async processes and handlers?
Something like:
try {
ReactDOM.render(<App />, document.getElementById("root"));
} catch (error) {
console.log("CAUGHT AN ERROR!!!!!!!")
console.log(error);
ReactDOM.render(<ErrorComponent />, document.getElementById("root"));
}