Skip to content
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

Support React 18 which uses ReactDOM createRoot instead of render #933

Closed
chrisbull opened this issue Jun 13, 2021 · 1 comment
Closed

Comments

@chrisbull
Copy link

Describe the feature you'd like:

Getting error when using React 18 react@alpha or react@experimental

I'm using React18 to get the new Suspense feature. When doing so, I have to upgrade ReactDOM which now throws an error to use createRoot instead of render

Suggested implementation:

Build in support for both createRoot and render

Describe alternatives you've considered:

In the testing-library@alpha build it to work with react-dom@alpha

Teachability, Documentation, Adoption, Migration Strategy:

See this for documentation: reactwg/react-18#5

@chrisbull chrisbull changed the title Fix to support React 18, which uses ReactDOM createRoot instead of render Support React 18, which uses ReactDOM createRoot instead of render Jun 13, 2021
@chrisbull chrisbull changed the title Support React 18, which uses ReactDOM createRoot instead of render Support React 18 which uses ReactDOM createRoot instead of render Jun 13, 2021
@eps1lon
Copy link
Member

eps1lon commented Jun 13, 2021

Thanks for the feedback.

I'm using React18 to get the new Suspense feature. When doing so, I have to upgrade ReactDOM which now throws an error to use createRoot instead of render

It should log an error to the console not throw if I remember correctly.

Closing as a duplicate of #509. You can try #925 in the meantime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants