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

react: legacyRoot is only supported in React <= 18 #1380

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented Apr 8, 2024

Copy link

netlify bot commented Apr 8, 2024

Deploy Preview for testing-library ready!

Name Link
🔨 Latest commit b4847d9
🔍 Latest deploy log https://app.netlify.com/sites/testing-library/deploys/6613f7980825800008bb7871
😎 Deploy Preview https://deploy-preview-1380--testing-library.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -107,6 +107,8 @@ your components.

### `legacyRoot`

**WARNING**: This option is only available when tests run with React 18 and earlier.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIR and please correct me if I'm wrong, using legacyRoot wasn't available for versions before React 18. Also, I think a note here will be nicer in terms of UX.

Suggested change
**WARNING**: This option is only available when tests run with React 18 and earlier.
:::note
This option is only available when tests run with React 18.
:::

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Legacy root is everything before React 18. We don't officially support React 17 with latest RTL though. But this section is specifically for the React version you have installed not for the RTL version.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also: this is not a note but a warning. Feel free to follow-up with an appropriate styling that's specific to our deploy setup.

@eps1lon eps1lon merged commit e99027a into testing-library:main Apr 8, 2024
4 checks passed
@eps1lon eps1lon deleted the react-canary branch April 8, 2024 14:09
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

Successfully merging this pull request may close these issues.

2 participants