Skip to content

Commit

Permalink
[flow] Update withNavigation and withNavigationFocus to support defau…
Browse files Browse the repository at this point in the history
…ltProps (#5398)
  • Loading branch information
levibuzolic authored and Ashoat committed Jan 3, 2019
1 parent c4b039c commit 59c09a6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

- Update flow definition for `withNavigation` and `withNavigationFocus` to support `defaultProps`

## [3.0.9] - [2018-12-19](https://github.com/react-navigation/react-navigation/releases/tag/3.0.9)

## Fixed
Expand Down
12 changes: 6 additions & 6 deletions flow/react-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -1208,19 +1208,19 @@ declare module 'react-navigation' {
};
declare export var TabBarBottom: React$ComponentType<_TabBarBottomProps>;

declare export function withNavigation<Props: {}>(
Component: React$ComponentType<Props>
declare export function withNavigation<Props: {}, ComponentType: React$ComponentType<Props>>(
Component: ComponentType
): React$ComponentType<
$Diff<
Props,
React$ElementConfig<ComponentType>,
{
navigation: NavigationScreenProp<NavigationStateRoute> | void,
}
>
>;
declare export function withNavigationFocus<Props: {}>(
Component: React$ComponentType<Props>
): React$ComponentType<$Diff<Props, { isFocused: boolean | void }>>;
declare export function withNavigationFocus<Props: {}, ComponentType: React$ComponentType<Props>>(
Component: ComponentType
): React$ComponentType<$Diff<React$ElementConfig<ComponentType>, { isFocused: boolean | void }>>;

declare export function getNavigation<State: NavigationState, Options: {}>(
router: NavigationRouter<State, Options>,
Expand Down

0 comments on commit 59c09a6

Please sign in to comment.