Skip to content

Release 6.0.0-alpha.1

Pre-release
Pre-release

Choose a tag to compare

@Doberjohn Doberjohn released this 29 Oct 15:24
· 91 commits to main since this release

About this prerelease

6.0.0-alpha.1 is the first 6.x prerelease since 6.0.0-alpha.0 in June: 41 commits from main, 11 of them breaking. It's for trying 6.x in real apps and finding what breaks before 6.0.0-beta.0. APIs can still change until beta.

npm install react-native-paper@alpha

Coming from 5.x or from alpha.0? Start with the 6.x migration guide. The breaking changes it doesn't cover yet are marked below. Please report problems as issues and mention 6.0.0-alpha.1.

Breaking changes since alpha.0

  • Accessibility props (#5005): accessibilityLabel, accessibilityRole, accessibilityState and related props become aria-label, role, aria-disabled, aria-checked, aria-selected and related props. The keys inside data objects change too: BottomNavigation routes[], SegmentedButtons buttons[] and FAB.Menu items take 'aria-label'. Not in the migration guide yet.
  • Modal and Dialog render through their own Portal (#5126): remove any Portal wrapper; a PaperProvider or Portal.Host must be above them, or they throw. While a modal is open, the app behind it is hidden from assistive technology and from test queries. Partly in the migration guide.
  • Modal accessibility (#5125): overlayAccessibilityLabel becomes dismissAccessibilityLabel; Modal and Dialog content have the dialog role and take aria-label; dismissableBackButton alone controls dismissal with the Android back button.
  • Reanimated styles (#5015): style props take styles from useAnimatedStyle; React Native Animated values are no longer accepted. elevation takes a level from 0 to 5 and animates changes itself. Appbar takes static styles and an elevated prop.
  • Surface (#5078): background color and corner radius move to the backgroundColor, borderRadius and border*Radius props; overflow: hidden and the pointerEvents prop are no longer supported. style no longer overrides the background or radius of Banner, Button, Card, Chip, Dialog, Menu contentStyle, Searchbar and Snackbar: use their color props or the theme.
  • testIDs (#5088, #5099): components no longer set default testIDs or derive internal ones from yours. Pass testID explicitly; new props such as iconTestID, trailingTestID and overlayTestID replace the derived IDs.
  • No more props injected into children (#5076): Card pads its content itself; set mode and compact on each Button inside Card.Actions and Dialog.Actions; List.Accordion indents only List.Item children.
  • Searchbar (#5117): the traileringIcon* props are renamed to trailingIcon, trailingIconColor, trailingIconAccessibilityLabel and onTrailingIconPress.
  • ToggleButton removed (#5095): use IconButton with selected, or SegmentedButtons.
  • Badge (#5013): the size prop is removed; a Badge without children renders a 6dp dot, and with children a 16dp pill. Not in the migration guide yet.

The full generated changelog follows.