Key changes
This is the second beta release of react-native-screens 5.0.0. On iOS, a Stack.Host rendered as the only direct child of a Split.Column now navigates that column, so its screens are the column's content and its header is the column's navigation bar. Split also gains a hide(column) command that runs UIKit's native column transition. The modals get two new components: PageSheet, a FormSheet sibling with UIKit's page sheet presentation, and ContainedModalReplacingContent, a contained modal that replaces its provider's content while it is open. Stack v5 header items on iOS gain tintColor and per-state text appearance for regular, prominent and back buttons. The release also fixes an Android Stack v4 crash when a nested stack is popped mid-animation and tabs that stayed in the tab bar after being removed from JS. A few values and exported types in the v5 API are renamed, see the migration below.
Breaking: actionOrigin values and renamed types
Two values of TabSelectedEvent.actionOrigin are now camelCase, in #5241: 'programmatic-js' becomes 'programmaticJs' and 'programmatic-native' becomes 'programmaticNative'. 'user' and 'implicit' stay the same. Code that compares against the old strings needs updating.
The exported v5 types follow the new naming conventions. The accepted values stay the same, and these type exports change:
SplitHostOrientationbecomesSplitOrientation, andSplitScreenPropsis replaced bySplitColumnPropsandSplitInspectorProps, in #5148.TabsHostColorSchemeandTabsHostDirectionbecomeTabsColorSchemeandTabsDirectionin #5236.FormSheetBackgroundEffectColor,FormSheetBackgroundEffectBlurandFormSheetBackgroundEffectBlurStyleare removed in #5301, useSheetBackgroundEffectColor,SheetBackgroundEffectBlurandSheetBackgroundEffectBlurStyle.ContainedModalPropsis replaced byContainedModalOverContentPropsandContainedModalReplacingContentPropsin #5321.TabsScreenEventHandleris no longer exported in #5238, and neither areOnDismissEventPayloadandSplitScreenColumnTypein #5287.
Improvements
- iOS (Split, Stack v5): a
Stack.Hostrendered as the only direct child of aSplit.Columnnavigates that column, with push and pop happening inside the column, in #5215. It builds on #5182, #5183, #5184 and #5214, with follow-up fixes in #5282 and #5313. SetdisableStackIntegrationonSplit.Columnto nest the stack in the column like any other content. - iOS (Split): added a
hide(column)command for theprimaryandsupplementarycolumns in #5124. It forwards toUISplitViewController.hide(_:), so UIKit picks the closest supported display mode and runs its native transition. - iOS (PageSheet v5): added
PageSheet, a sibling ofFormSheetthat presents with UIKit's page sheet style, in #5131. On Android it presents the same bottom sheet asFormSheet. - iOS (ContainedModal): added
ContainedModalReplacingContent, which takes the provider's children off screen while the modal is open and brings them back with their state intact on dismissal, in #5088. - iOS (Stack v5): header items accept
tintColor, applied to text, SF Symbols and template images, in #4623. - iOS (Stack v5): the
buttonandprominentButtonheader appearances accept text attributes (fontFamily,fontSize,fontWeight,fontStyleandfontColor) for thenormal,highlighted,disabledandfocusedstates in #4622, and the newbackButtonappearance styles the back button the same way in #4624. - Stack v4: added letter spacing for header text with
titleLetterSpacingon iOS and Android, and withlargeTitleLetterSpacing,backTitleLetterSpacingandletterSpacingin thetitleStyleof bar button items on iOS, in #4937. - iOS (Stack v4): header bar button items and menus accept
axisBehavior(automatic,horizontalOnlyorverticalPreferred) on iOS 27.1+, which keeps an item in the horizontal bar or moves it to the vertical rail on an open iPhone Duo, in #5142. - Android: the library's default SDK versions are now 24 for the minimum SDK and 36 for the compile and target SDK in #5138.
Bug fixes
- Android (Stack v4): popping a nested stack while its inner pop animation is still running no longer crashes in #5113.
- Android (Stack v4): a screen pushed while the app goes to the background receives
onAppearonce the app resumes, so React Navigation emitstransitionEnd, in #5171. - Android (Tabs): a tab removed from JS is removed natively as well, so it leaves the tab bar and removed tabs can no longer pile up past the six-item limit and crash, in #5074.
- Android (Tabs): every
SafeAreaViewrendered in the tabs is notified about tab bar inset changes, where only the most recently mounted one was before, in #5145. - Android (FormSheet v5): a drag that starts on a scrolled list scrolls the list and stops at its top instead of moving or dismissing the sheet in #5116.
- Android (FormSheet): a
fitToContentssheet with a visible grabber includes the grabber's height, so the bottom of its content stays visible, in #5258. - Android (Stack v5): setting the same
screenKeyon a screen again is accepted, which fixes a crash on mount with React Native'senableAccumulatedUpdatesInRawPropsAndroidflag, in #5269. - iOS (Stack v4): interactive swipe-back pops with the
fadeandfade_from_bottomanimations follow the gesture whenanimationMatchesGestureis set in #5146. - iOS (Stack v4): the navigation bar stays intact after a back-button pop is cancelled by
preventNativeDismisswhile the screen below hasheaderShown: false, in #5162. - iOS (Stack v4): pushing a screen right after dismissing a form sheet that hosts its own stack no longer reports a
sheetPresentationController is nullerror in #5147, and a form sheet no longer clips the list of another screen to the sheet's height after its nested navigator unmounts in #5153. - iOS (Split): a column shown after the Split collapses takes the size of the collapsed Split, where it was too narrow on an iPad before, in #5290.
- iOS (Split): every column is told when the Split repositions its columns, so a column shown with the
showcommand on iOS 27.2 no longer keeps the frame from before it moved, in #5248. - iOS (ContainedModal): the debug containment check tolerates sub-pixel differences between the modal and its provider, so it no longer trips after a rotation, in #5087.
New contributors
Welcome to our new contributors: @lassiecoder, @rafalnawojczyk, @huntie, @maxlapides, @chocky335 and @wildan-m.
See the full release notes for 5.0.0-beta.2 on GitHub and the full changelog in 5.0.0-beta.1...5.0.0-beta.2.