chore: replace react-native-restart with expo reloadAppAsync#7485
chore: replace react-native-restart with expo reloadAppAsync#7485diegolmello wants to merge 2 commits into
Conversation
react-native-restart@0.0.22 is an unmaintained legacy interop-only native module carrying an Android build.gradle patch. Expo (already a dep) exposes reloadAppAsync via expo-modules-core — a new-arch-native app reload. Swap the single call site (LanguageView RTL switch), drop the dep, patch, and type decl.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (6)
💤 Files with no reviewable changes (2)
📜 Recent review details🧰 Additional context used📓 Path-based instructions (5)**/*.{js,ts,jsx,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
app/views/**/*.tsx📄 CodeRabbit inference engine (CLAUDE.md)
Files:
app/i18n/**/*.ts📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧠 Learnings (5)📚 Learning: 2026-04-30T17:07:51.020ZApplied to files:
📚 Learning: 2026-06-24T22:58:43.390ZApplied to files:
📚 Learning: 2026-06-25T18:37:44.793ZApplied to files:
📚 Learning: 2026-02-05T13:55:00.974ZApplied to files:
📚 Learning: 2026-05-07T17:47:14.516ZApplied to files:
🔇 Additional comments (6)
WalkthroughUpdates React Native localization matching to the newer API and mock, replaces RTL language restart handling with Expo app reload, adjusts ambient declarations, upgrades ChangesLocalization and runtime integration
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
package.jsonParsing error: Missing semicolon. (2:7) Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Proposed changes
react-native-restart@0.0.22is an unmaintained (0.0.x) legacy native module that only runs on RN'sNew-Architecture interop layer, and it carries an Android
build.gradlepatch just to build. Thisreplaces it with
reloadAppAsyncfrom theexpopackage — a new-arch-native app reload exposed byexpo-modules-core(already installed as a core dependency; noexpo-updatesneeded).app/views/LanguageView/index.tsx: the sole call site — swapRNRestart.Restart()forreloadAppAsync('Language RTL change')(fires only on an RTL⇄LTR language switch, where a hardnative reload is required for
I18nManagerto flip).react-native-restartdependency, deletepatches/react-native-restart+0.0.22.patch, andremove its
declare moduleentry fromapp/externalModules.d.ts.One fewer unmaintained module riding the interop layer.
Issue(s)
Part of the RN 0.83 / Expo 55 interop-hardening effort under https://rocketchat.atlassian.net/browse/NATIVE-1234
How to test or reproduce
Verified on Android (Pixel API 34, arm64): the app builds with the module + patch removed, boots
cleanly, and the reload primitive (
globalThis.expo.reloadAppAsync) hard-reloads the app in therunning bundle.
Screenshots
Types of changes
Checklist
Further comments
Targets the RN 0.83 / Expo 55 integration branch (
chore/rn-0.83-expo-55, #7481), notdevelop—reloadAppAsyncand the surrounding Expo 55 setup only exist there.expo-updates'reloadAsync()was rejected as heavyweight (it pulls the whole OTA-updates module for a reload the core runtime
already provides for free).
Summary by CodeRabbit
Bug Fixes
Maintenance