mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-04-23 20:10:49 +08:00
Make Router({ RouteName: Component }) a valid way to configure a router (#3486)
* Make Router({routeName: Component}) a valid way to instantiate a route
* Update App.js in NavigationPlayground
* Fix route config flow type
This commit is contained in:
5
flow/react-navigation.js
vendored
5
flow/react-navigation.js
vendored
@@ -332,12 +332,15 @@ declare module 'react-navigation' {
|
||||
navigationOptions?: ?NavigationScreenConfig<Options>,
|
||||
};
|
||||
|
||||
declare export type NavigationRouteConfig = {
|
||||
declare export type NavigationRouteConfig =
|
||||
| NavigationComponent
|
||||
| {
|
||||
navigationOptions?: NavigationScreenConfig<*>,
|
||||
path?: string,
|
||||
} & NavigationScreenRouteConfig;
|
||||
|
||||
declare export type NavigationScreenRouteConfig =
|
||||
| NavigationComponent
|
||||
| {
|
||||
screen: NavigationComponent,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user