You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Below is the code that i have written in simple Vite app with react & react-dom version as 19.x
Below error is because of react 17 react-dom.render method and it was not caught by the methods we added while creating root.
While the vscode says it's a deprecated method but using it throws an uncaught error which is not caught by the newly introduced method. I believe some kind of message should be provided that createRoot/hydrateRoot methods are only methods to be used.
If someone is going to migrate to react 19 for its new features, easiness and the compiler. they can try to migrate directly from v15 - v18 to v19. this uncaught error could make things difficult for them.
The text was updated successfully, but these errors were encountered:
onUncaughtError applies only to errors that could have been handled by an Error Boundary. Calling ReactDOM.render could not have been caught by an Error Boundary since the root with the error handlers wasn't even created yet.
Summary
Above error is because of react 17 react-dom.render method and it was not caught by the methods we added while creating root.
Page
https://react.dev/blog/2024/04/25/react-19#error-handling
Details
Below is the code that i have written in simple Vite app with react & react-dom version as 19.x
Below error is because of react 17 react-dom.render method and it was not caught by the methods we added while creating root.
While the vscode says it's a deprecated method but using it throws an uncaught error which is not caught by the newly introduced method. I believe some kind of message should be provided that createRoot/hydrateRoot methods are only methods to be used.
If someone is going to migrate to react 19 for its new features, easiness and the compiler. they can try to migrate directly from v15 - v18 to v19. this uncaught error could make things difficult for them.
The text was updated successfully, but these errors were encountered: