chore: bump react-native-screens 4.10.0 → 4.16.0#7368
chore: bump react-native-screens 4.10.0 → 4.16.0#7368janicduplessis merged 3 commits intodevelopfrom
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
87717be to
95dc11e
Compare
|
🧪 Flashlight Performance Report (AWS Device Farm) 🔀 Commit: 8c95ce4
|
95dc11e to
1234ab3
Compare
olerass
left a comment
There was a problem hiding this comment.
LGTM overall. Small finding from robot Ole (my local AI eval):
In
MainActivity.kt:21: thesuper.onCreate(null)line there is a long-standing workaround for an Android issue (software-mansion/react-native-screens#17) where when Android restores fragments after a config change or process death, react-native-screens' fragments get duplicated -- Android tries to restore them at the same time as React recreates them from JS. Passing null instead ofsavedInstanceStatebasically tells Android "skip all fragment restoration", and React re-renders everything fresh. Blunt, but works.4.16.0 adds a scoped alternative (software-mansion/react-native-screens#3089): a
RNScreensFragmentFactoryyou install on the fragment manager that auto-removes only RNS fragments when Android tries to restore them, so other fragment restoration still works. For brownfield apps that matters; for us afaiu it doesn't -- we don't have any other fragment consumers in native code, and the manifestconfigChangesintercepts most of the triggering cases anyway. So we're fine staying on the old pattern.
AFAIU this is a nit is that the existing comment ("Pass null here as required by react-native-screens") isn't accurate anymore since it's no longer the only way. Not blocking. Probably worth either a one-line comment update in this PR, or a follow-up to migrate to the factory + note in the PR body that we're intentionally staying on the legacy pattern.
1234ab3 to
b378c30
Compare
…ve-screens 4.16+ The old 'Pass null here as required by react-native-screens' comment was no longer accurate — 4.16 ships an RNScreensFragmentFactory as a scoped alternative. Replace with a longer comment explaining what the `null` does, why it's needed (rnscreens#17), and why we're keeping the blunt form (no other native fragment consumers).
react-native-screens 4.16 adds RNScreensFragmentFactory as a scoped replacement for the older `super.onCreate(null)` workaround (software-mansion/react-native-screens#3089). The factory auto-removes only RNS fragments on Android-initiated restoration, so native fragment consumers added later still get their normal restoration lifecycle. Switching now even though we have no other fragment consumers today keeps us on the upstream-recommended pattern rather than a legacy workaround.
8341d0f to
1d6e895
Compare
What changed (plus any additional context for devs)
Bumps
react-native-screensfrom 4.10.0 to 4.16.0 (Expo 54's pinned range). No patch needed.We only directly import
enableScreensandFullWindowOverlay, neither of which changed. React-navigation depends on this library heavily under the hood, so it is foundational for the whole navigation stack. Between 4.10 and 4.16 the library addedformSheet/pageSheetpresentations, experimental native bottom tabs (gated behind flags we don't enable), iOS 26 compatibility, and edge-to-edge integration. Everything RN-version-specific is gated to new arch via CMake guards, so on our old-arch build there is no coupling to RN 0.79 vs 0.81. 4.14.0 drops RN < 0.79 support — still fine for us.Why not 4.24.0 (latest)
Initially tried 4.24.0 but the Android CI build failed for two reasons that both trace back to newer-RN assumptions:
androidx.core:core-ktx:1.17.0transitively, which requirescompileSdk=36. We're still on 35 until the RN 0.81 bump PR lands.ScreenStackHeaderConfigNativeComponent.tshas anonAttachedprop whose type resolves toundefinedunder our current codegen.4.16.0 avoids both issues and matches Expo 54's
~4.16.0pin.MainActivity.kt: migrate toRNScreensFragmentFactory4.16 introduced a scoped alternative (software-mansion/react-native-screens#3089) to the long-standing
super.onCreate(null)workaround (software-mansion/react-native-screens#17): install anRNScreensFragmentFactoryon the fragment manager and it removes only RNS fragments when Android tries to restore them, so other fragment restoration still works.Swapped the old
super.onCreate(null)forsupportFragmentManager.fragmentFactory = RNScreensFragmentFactory()followed bysuper.onCreate(savedInstanceState). We don't have other native fragment consumers today, but adopting the upstream-recommended pattern means we're not stuck on a workaround any reviewer has to re-derive next time they touch this file.Verified against our Mobile React Native 0.81 Upgrade Plan. Extracted from #7366 (RN 0.81 bump) so it can land independently.
Screen recordings / screenshots
N/A — no visual changes expected.
What to test