-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[EXPERIMENT] Migrate to Expo 52 with CNG and React Native 0.77 [NOMERGE] #6137
Conversation
Nightmare coming for @diegolmello :) ![]() |
@Rohit3523 😂 it looks scary at first, but:
It's a bit like moving all your furniture and electronics to the yard while upgrade the plumbing and wiring, then putting all of it back one by one. This draft PR helps me track the things that are still in the "yard". Using expo's continuous native generation will ensure a move like this won't be needed again in the very long-term. |
Decided to go with RN 0.77 for this experiment since the only incompatibility I ran into with 0.76 is the removal of |
Version 78 is also on the way 🥲 |
@Rohit3523 the thought also crossed my mind, but we don't need to worry about it now, since expo will handle it "later this year". Also, once migration is done it will be better to think in terms of Expo SDK versions rather than react native versions. |
Why not using expo-images instead of react-native-fast-image? |
@Rohit3523 I considered it, but it introduces behavioral changes. Ideally the migration wouldn't even touch the app folder to avoid introducing new bugs. After migration, expo-image can be used if it solves some problem. |
The experiment validated that the project can fully migrate to expo 52 taking full advantage of CNG, react native 0.77, and the new architecture. I'll close this in order to pursue incremental steps like #6143 (@diegolmello 🥇 ) and eventually a smooth migration PR. Note: Recently, hermes / react-native added native (non-polyfilled) support for Web APIs such as WeakRef which I'm hopeful will give us ways to better manage memory consumption especially on Android, not to mention the possibility of integrating fuselage with no compromises as more Web APIs can be used unpolyfilled. |
This goal of this PR is to figure out the best migration path. It's not currently meant to be merged. Many of the deleted files and commented out lines are in the process of being migrated.
Experiment findings (WIP)
These changes may be pursued separately in order to facilitate this migration with minimal disruption:
Automated code migration
For migration of patterns used in hundreds of files, ast-grep is a great tool.
Some examples used used in this PR:
Missing displayName in memoed components:
Incompatible redux action types:
Debugging & profiling
During migration, the new react-native-devtools (supported since >0.76) can be used in order to narrow down issues.