All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Add
dangerouslyGetParent()
to flow typings - Update react-navigation-stack to 0.7.0
- Add transparentCard option to fix cards with a transparent bg when using rn-screens
- Add window dimensions for iPhone XS Max and iPhone XR
- Vendor clamp
- Add overflow hidden to stack container
- Completion on mount: StackView is responsible for calling the navigation completion action when
state.isTransitioning
is set. This fix handles that case when the stack is first mounting.
- Updated react-navigation-stack to 0.6.0 to make react-native-screens a peerDependency.
- Updated react-navigation-tabs to 0.8.2 to make react-native-screens a peerDependency and add support for it in bottom tab navigator.
- Make react-native-screens a direct dependency of react-navigation.
- Updated react-navigation-safe-area-view to 0.11.0 to support iPhoneXS Max and iPhoneXR.
- Updated react-navigation-stack to 0.5.1 to clamp interpolated values in animations.
- Updated react-navigation-stack to 0.5.0 to solve black screen on back and unpressable header area with hidden header when using react-native-screens.
- Updated react-navigation-stack to add experimental support for react-native-screens. See https://github.com/kmagiera/react-native-screens for information about how to enable it.
- Updated react-native-safe-area-view to 0.10.0 to solve circular dependency issue (fixes react-navigation#4973)
- When
tabBarIcon
is a function it is now provided with ahorizontal
option that indicates whether horizontal tabs are being rendered (label to the right of the icon) or not. - Add some missing flow types (1, 2).
- Updated react-navigation-stack to 0.3.0.
- Updated react-navigation-tabs to 0.7.0.
- Pinned
create-react-context
dependency to0.2.2
(react-navigation#4934)
- Fixes tab label font sizes in landscape and portrait.
- Default tab bar background color and header background color are white on iOS.
- Fix crash on react-native@>=0.56 described in react-navigation#4886
- Move stack specific view code to react-navigation-stack
- Add accessibility props for inactive screens in stack (https://github.com/react-navigation/react-navigation-stack/commit/4e04428e26df9076413b57b3346a7ce357de1a77)
- Updated header title to match iOS 11/12 style correctly (react-navigation/stack#1)
- Add support for animating the header background on screen transitions and add interpolator to animate it along with the rest of the screen, but this is still opt-in behavior (react-navigation/stack#3)
- Updated react-native-safe-area-view to 0.9.0
- Revert rename of pathUtils
- Fix some exports related to the 2.11.0 changes to move stack navigator out of core
- Export some modules that are useful for moving stack navigator outside of core
lazy
andoptimizationsEnabled
options tocreateMaterialTopTabNavigator
([email protected])
- Android back button in stack with drawer closes drawer properly if open ([email protected])
- Fixes bug where
null
doesn't work in routerOptionspaths
object for deeplinking (#4791)
- Add
NavigationTestUtils
which can be imported by path to be used with jest snapshot testing.
- Export
StackViewTransitionConfigs
to allow you to extend default config in custom transition configs. #4761
- Error when building with haul: ref to pathToRegexp.compile. #4658.
- Incorrect parameters passed to title offset calculation led to bug in header layout when no right component (react-navigation#4754)
- Typo in Header transition preset check.
headerLayoutPreset: 'center' | 'left'
to provide an easy solution for questions like this.headerBackTitleEnabled
- this configuration option for stack navigator allows you to force back button titles to either be rendered or not (if you disagree with defaults for your platform and layout preset).
- Android back button ripple is now appropriately sized (fixes #3955).
- Respect header background color on container (fixes edge case where user depended on displaying content that was rendered behind the navigator, this particular behavior should not be depended on and may break in the future, but this change is still useful regardless).
headerLeftContainerStyle
,headerTitleContainerStyle
, andheaderRightContainerStyle
are exposed onnavigationOptions
. These properties allow you to customize the style of the container ofheaderLeft
,headerTitle
andheaderRight
components.
- Fixed memory leaks in
createNavigator
: closure scope leak, and clean up old descriptors.
- The enableURLHandling prop on the top level navigator component allows you to disable deep linking handling. Currently it is always enabled. To disable it,
<RootNavigator enableURLHandling={false} />
- StackNavigator.replace method no longer requires a key param. If the key is left undefined, the last screen in the stack will be replaced.
- Support headerLeft component for the first screen in a stack (#4608).
- Removed bottomBorder when
headerTransparent
is set to true. - Improve empty path and param handling in deep linking (#4671). This fixes issues with deep linking and fully tests the differences between path: '' and path: null. Empty string matches empty paths, and null path will let the child router handle paths at the same level. Also it makes sure that params are not duplicated between path and query when they are serialized with getPathAndParamsForState.
- Fix onTransitionStart not being invoked when provided in navigator config.(#4100)
- Rare case when users navigated back and forth quickly with exactly the right timing would cause a crash due to a scene being queued to transition, then clobbered, then attempted to render as a stale scene but without a descriptor. (commit)
- Relax vertical padding warnings on header.
- Warn for more invalid headerStyle properties (padding, top/right/bottom/left, position).
- Fixed missing header shadow on Android.
- NavigationEvents component as a declarative interface for subscribing to navigation focus events.
- Fix stack router child router delegation priority (https://github.com/react-navigation/react-navigation/commit/e8c1833053e37d28f0ce505ff323565abf23b6a2)
- Avoid crash when calling isFocused on old route (https://github.com/react-navigation/react-navigation/commit/0921889f7a3acfc6d6bcc4909d209eeeee985ba7)
- Stack router no longer attempts to parse query params within path handling
- Switch router now has exact same param treatment for URLs as stack router does
- Internally we no longer need to special case PlatformHelpers by platform as react-native-web handles the APIs we mocked out with it now.
- Throw error in development mode when header navigation option is set to a string - a common mistake that would otherwise result in a cryptic error message.
- Throw error in development mode when title is not a string.
- Delegate to child routers for more than just the top screen in the stack.
- Update react-navigation-drawer to 0.4.3 to fix
initialRouteParams
option
- Header no longer sometimes flashes for 1 frame when using
header: null
on initial route of stack with floating header. - Export
createSwitchNavigator
in react-navigation.web.js
setParams
applies to the navigation object it is called on even if that is the navigation object for a navigation view (more details in react-navigation#4497)
- Update react-navigation-drawer to fix regression in toggleDrawer
transitionConfig
in stack navigator no longer passes incorrectfromTransitionProps
when navigating back
- Refactor internals to make it play more nicely with web
const defaultGetStateForAction = SwitchBasedNavigator.router.getStateForAction
no longer throws error.- Updated react-navigation-drawer to 0.4.1 which should fix issues related to automatically closing drawer when changing routes.
- Improved examples