Performance Enhancement: Migrate to Modern React Native Architecture 🚀 #8521
+275
−322
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
This PR introduces changes to modernize the React Native architecture, yielding significant improvements in native performance and enabling bridgeless mode compatibility (see https://reactnative.dev/architecture/landing-page#fast-javascriptnative-interfacing for more information). Migrating to these updated packages ensures long-term support, alignment with modern React Native standards, and enhanced performance for future project development.
Package Updates:
react-native-fs
->@dr.pogodin/react-native-fs
: This migration replaces the original package with a version that supports the new React Native architecture and is actively maintained. Refer to the project history and roadmap here: https://github.com/birdofpreyru/react-native-fs?tab=readme-ov-file#project-history--roadmap. An additional benefit is improved tree shaking capabilities.@react-native-async-storage/async-storage
->react-native-mmkv
: This change leverages the new React Native architecture through Turbo Modules, resulting in substantial performance gains.react-native-mmkv
is approximately 25x faster than@react-native-async-storage/async-storage
. Benchmark details can be found here: https://github.com/mrousavy/react-native-mmkv?tab=readme-ov-file#benchmark.Expo Packages: All Expo-related packages have been updated to their latest versions. Importantly,
expo-camera
has been migrated from the legacy (deprecated) version to the new version (expo-camera-next
). This new version uses an improved camera API under the hood. See more details here: https://expo.dev/blog/expo-camera-next#our-goals-for-expo-cameranext.Release Strategy Suggestion:
As for the release, I suggest we can either release this update with a
@beta
tag to allow users to test the changes before the final release or we can update all relevant documentation and introduce this as a breaking change for the next major version. This will give us the flexibility to properly communicate the changes and ensure a smooth upgrade path for the users.Please review these changes and let me know if you identify any issues or potential areas for improvement. Your feedback is greatly appreciated.