-
Notifications
You must be signed in to change notification settings - Fork 273
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
feat: option for enabling concurrent rendering #1685
Conversation
const testRendererOptions: TestRendererOptions = { | ||
...rest, | ||
// @ts-expect-error incomplete typing on RTR package | ||
unstable_isConcurrent: concurrentRoot ?? getConfig().concurrentRoot, |
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.
Just curious, with RTR being deprecated, do you plan to remove it?
https://github.com/facebook/react/tree/main/packages/react-test-renderer
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.
@slorber I've got a working prototype for alternative test renderer built using React Reconciler (the package that virtually all alt React renderers use) in #1669. It passes all of RNTL tests and would be a good replacement for RTR. I still need to modify it for React 19 (in #1690). While transition to the new render will happen, there is no immediate urgency to replace RTR, as it still works with React 19, although with deprecation warning (which is btw disabled for RN testing).
My plan is as follows:
- RNTL v13 (alpha version already published) will be based on RTR and support React 18 & 19.
- RNTL v14 will be based on the new renderer and support probably React 19+
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.
I see thanks 👍
This PR has been released in v12.8.0 🎉 |
Summary
Add
concurrentRendering
option to bothrender
andconfigure
that allows enabling concurrent rendering in the underlying React Test Renderer. The option is disabled by default not to break user tests but should be enabled in the next major release.Test plan