-
Notifications
You must be signed in to change notification settings - Fork 45.6k
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
Add default for current act queue #21935
Conversation
We need to fix that |
So we should just not sync those files when we run the React Native sync, and only build them when they upgrade the OSS version of React? |
Comparing: 9b76d2d...1ac5ca2 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
Historically we've tried to maintain backwards/forwards compatibility between the isomorphic package and the renderer within the same major version. (I think we should consider being even stricter in the future, but set that aside for now). The open source version is React 17, whereas main is on React 18. So I don't think we should be adding extra code to maintain backwards compatibility with a 17 build.
I find it less heavy handed than allowing this to leak into the open source build, though |
We should use the synced isomorphic package and the synced renderer, instead of mismatching them. They're separate packages but they should be used in lockstep. |
We do that internally, this is for OSS builds. If this were feature flagged, it would be on in |
A counter-argument is that 17 is designed to allow for multiple React versions in the same app, but our recommendation there is to use separate Webpack configs to bundle multiple Reacts. Otherwise we're setting a precedent that the isomorphic package has to be perpetually compatible, and I'd really rather not do that. |
I don't really get how RN open source releases work, but the principle is that there shouldn't be a mismatch between the isomorphic package and the renderer. So if you sync one, you should sync the other. |
Yes, the issue is that we're syncing the OSS renderer but not upgrading the OSS version of React, because it hasn't been published yet. I'll fix in the sync script. |
Overview
If you're depending on an older version of React than the renderer uses, we'll crash on
ReactCurrentActQueue is undefined
.For example, OSS React Native builds use the sync'd renderer but the latest OSS React version. This is a simple fix to default ReactCurrentActQueue so it doesn't error. Another fix would be to feature flag this to non-React Native OSS builds, but that seem heavy handed.