React Native Screens 5.0.0-beta.2

v5.​0.​0-​beta.​2Pre-release

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:

  • SplitHostOrientation becomes SplitOrientation, and SplitScreenProps is replaced by SplitColumnProps and SplitInspectorProps, in #5148.
  • TabsHostColorScheme and TabsHostDirection become TabsColorScheme and TabsDirection in #5236.
  • FormSheetBackgroundEffectColor, FormSheetBackgroundEffectBlur and FormSheetBackgroundEffectBlurStyle are removed in #5301, use SheetBackgroundEffectColor, SheetBackgroundEffectBlur and SheetBackgroundEffectBlurStyle.
  • ContainedModalProps is replaced by ContainedModalOverContentProps and ContainedModalReplacingContentProps in #5321.
  • TabsScreenEventHandler is no longer exported in #5238, and neither are OnDismissEventPayload and SplitScreenColumnType in #5287.

Improvements

  • iOS (Split, Stack v5): a Stack.Host rendered as the only direct child of a Split.Column navigates 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. Set disableStackIntegration on Split.Column to nest the stack in the column like any other content.
  • iOS (Split): added a hide(column) command for the primary and supplementary columns in #5124. It forwards to UISplitViewController.hide(_:), so UIKit picks the closest supported display mode and runs its native transition.
  • iOS (PageSheet v5): added PageSheet, a sibling of FormSheet that presents with UIKit's page sheet style, in #5131. On Android it presents the same bottom sheet as FormSheet.
  • 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 button and prominentButton header appearances accept text attributes (fontFamily, fontSize, fontWeight, fontStyle and fontColor) for the normal, highlighted, disabled and focused states in #4622, and the new backButton appearance styles the back button the same way in #4624.
  • Stack v4: added letter spacing for header text with titleLetterSpacing on iOS and Android, and with largeTitleLetterSpacing, backTitleLetterSpacing and letterSpacing in the titleStyle of bar button items on iOS, in #4937.
  • iOS (Stack v4): header bar button items and menus accept axisBehavior (automatic, horizontalOnly or verticalPreferred) 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 onAppear once the app resumes, so React Navigation emits transitionEnd, 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 SafeAreaView rendered 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 fitToContents sheet 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 screenKey on a screen again is accepted, which fixes a crash on mount with React Native's enableAccumulatedUpdatesInRawPropsAndroid flag, in #5269.
  • iOS (Stack v4): interactive swipe-back pops with the fade and fade_from_bottom animations follow the gesture when animationMatchesGesture is set in #5146.
  • iOS (Stack v4): the navigation bar stays intact after a back-button pop is cancelled by preventNativeDismiss while the screen below has headerShown: 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 null error 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 show command 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.

Release card
React Native Screens 5.0.0-beta.2 release card