-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Test layout.tsx file without having validateDOMNesting warning #1250
Comments
Based on the types of ReactDOM, I see that the Canary version allows passing If you don't mind the TS error, you can workaround this by doing something like this: |
This is a React 19 feature. In React 18 you can't render into In React 19, you'd just do All we have to do on the RTL side is ensure we properly type
You shouldn't do this in React 18 since that's not supported. |
That's why I was using the canary release in my stackblitz, the typing for the canary release support this, isn't that enough? |
Yeah Canary should be fine. Then all we need is #1304 |
Describe the feature you'd like:
As a user of react 18 with NextJS (with app directory), I would like to test routLayout.tsx file without having this warning :
Warning: validateDOMNesting(...): <html> cannot appear as a child of <div>. at html at children
Suggested implementation:
Maybe by modifying the container options
Thank you so much for your help
The text was updated successfully, but these errors were encountered: