mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-04-29 12:55:21 +08:00
Add <NavigationEvents/> component (#4188)
* add NavigationEvents * expose TabsWithNavigationEvents in lib entrypoints * Add NavigationEvents example in playground * Add NavigationEvents example in playground * Add NavigationEvents tests * Add NavigationEvents Flow declarations * remove useless NavigationEvents constructor * NavigationEvents => make tests more readable by avoiding beforeEach callback * fix flow test error by adding <any, any> to React.Component
This commit is contained in:
committed by
Brent Vatne
parent
4e384f8057
commit
1951a3ac46
15
flow/react-navigation.js
vendored
15
flow/react-navigation.js
vendored
@@ -557,6 +557,21 @@ declare module 'react-navigation' {
|
||||
navigationOptions?: O,
|
||||
}>;
|
||||
|
||||
/**
|
||||
* NavigationEvents component
|
||||
*/
|
||||
|
||||
declare type _NavigationEventsProps = {
|
||||
navigation?: NavigationScreenProp<NavigationState>,
|
||||
onWillFocus?: NavigationEventCallback,
|
||||
onDidFocus?: NavigationEventCallback,
|
||||
onWillBlur?: NavigationEventCallback,
|
||||
onDidBlur?: NavigationEventCallback,
|
||||
};
|
||||
declare export var NavigationEvents: React$ComponentType<
|
||||
_NavigationEventsProps
|
||||
>;
|
||||
|
||||
/**
|
||||
* Navigation container
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user