Using React in Codesandbox i tried to throw new Error('Something went wrong'); and i had this error:
I already added this dependency: https://babeljs.io/docs/en/babel-plugin-proposal-throw-expressions and still won't work.
Here's my code
<div className="App">
<ErrorBoundary>
<h1>Counter {counter >= 10 ? throw new Error("Over 10!") : null}</h1>
</ErrorBoundary>
</div>