6.0.0-next.0 (2021-03-09)
Bug Fixes
- add missing helper types in descriptors (21a1154)
- drop support for headerMode='none' (0c55803)
- drop usage of Dimensions in favor of metrics from safe-area-context (12b893d)
- enable detachInactiveScreens by default on web for better a11y (4954d6a)
- fix initial metrics on server (69d333f)
- fix transparent modal on web (c345ef1)
- force dismiss keyboard if there was no gesture (14ac256), closes #9078
Code Refactoring
- don't use absolute position for header (79a85a4)
- don't use deprecated APIs from react-native-safe-area-context (ddf27bf)
- simplify props for stack and drawer headers (4cad132)
Features
- add a slide animation for modals on Android (6f326cf)
- add an option to specify default options for the navigator (c85f2ff)
- add pressColor and pressOpacity props to drawerItem (#8834) (52dbe4b)
- don't hardcode header back test ID (22a8afa)
- export TransitionPreset for custom TransitionPresets (#9173) (6c3cccf)
- initial implementation of @react-navigation/elements (07ba7a9)
- use modal presentation style for modals on iOS by default (8a63f19)
BREAKING CHANGES
- We now use flexbox for header elements which could break some existing style code which relied on absolute positioning.
- Now the back button test ID can be customized using headerBackTestID option
- We now require newer versions of safe area context library.
- Previously, the stack header accepted scene and previous scene which contained things such as descriptor, navigation prop, progress etc. The commit simplifies them to pass
route
,navigation
,options
andprogress
directly to the header. Similaryly, theprevious
argument now containsoptions
,route
andprogress
. - The header can be hidden with
headerShown: false
already. Using bothheaderMode='none'
andheaderShown
together causes confusion. So it's time to drop the unnecessaryheaderMode
prop.