-
-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error in error handling #896
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
Otherwise the error boundary itself will throw "In HTML, <h1> cannot be a child of <#document>. This will cause a hydration error." which will result in an infinite re-rendering loop.
2b8eae0
to
e6e3f6e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution!
function renderError(message: string) { | ||
return createElement( | ||
'html', | ||
null, | ||
createElement('body', null, createElement('h1', null, message)), | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't feel like a final solution, but it looks good to me for now at least.
The error boundary does not render
html
orbody
tags and therefore causes and error itself.