github react-navigation/react-navigation @react-navigation/core@6.0.0-next.0

latest releases: @react-navigation/stack@7.0.0-alpha.20, @react-navigation/native-stack@7.0.0-alpha.20, @react-navigation/material-top-tabs@7.0.0-alpha.19...
pre-release3 years ago

6.0.0-next.0 (2021-03-09)

Bug Fixes

  • add missing helper types in descriptors (21a1154)
  • check duplicate names only for immediate nested screens (36a9b4f)
  • don't merge params on navigation (366d018)
  • drop dangerously prefix from getState and getParent (227f133)
  • drop support for legacy linking config (0e13e8d)
  • fix default screen options not being respected (03ba1f2)
  • fix incorrect state change events in independent nested container (b82a912), closes #9080
  • print an error when passing a second argument to useFocusEffect (c361795)
  • remove the state property from route prop (ebab518)
  • show redbox instead of crash if navigation isn't initialized (13d8553)

Features

  • add a way to specify an unique ID for screens (15b8bb3)
  • add an option to specify default options for the navigator (c85f2ff)
  • allow returning null or undefined to skip actions with dispatch (d6466b7)
  • associate path with the route it opens when deep linking (#9384) (86e64fd), closes #9102
  • warn on duplicate screen names across navigators (02a031e)

BREAKING CHANGES

  • This commit drops support for legacy linking config which allowed screens to be specified without the screens property in the config.
  • Previous versions of React Navigation merged params on navigation which caused confusion. This commit changes params not to be merged.

The old behaviour can still be achieved by passing merge: true explicitly:

CommonActions.navigate({
  name: 'bar',
  params: { fruit: 'orange' },
  merge: true,
})

initialParams specified for the screen are always merged.

  • any code which relies on route.state will break.

Previous versions printed a warning on accessing route.state. This commit removes the property entirely. Accessing this property isn't safe since child navigator state isn't gurranteed to be in sync with parent navigator state and cause subtle bugs in apps.

Don't miss a new react-navigation release

NewReleases is sending notifications on new releases.