DefinitelyTyped/types/react-navigation/react-navigation-tests.tsx
huhuanming 7547cd219a Add React navigation (#16223)
* Add react-navigation Types

* Add actions

Functions : https://reactnavigation.org/docs/navigators/navigation-actions
Note: the `type` option has to be optional because if not, we have to add it when we use one of actions.

* Support of Screen Navigation Options

For Stack, Tab and Drawer

* Add Generic for NavigationNavigatorProps params

* NavigationParams: any type of param

* Add Tab and Drawer Navigators

* Use of ViewStyle and TextStyle

* Improve tsconfig.json && tslint.json

* Add Test

* fix test

* fix lint
2017-05-01 12:35:36 -07:00

31 lines
525 B
TypeScript

import * as React from 'react';
import { View } from 'react-native';
import {
addNavigationHelpers,
StackNavigator,
} from 'react-navigation';
const Start = (
<View />
);
export const AppNavigator = StackNavigator({
StartImage: {
path: 'startImage',
screen: Start,
},
}, {
initialRouteName: 'StartImage',
});
const Router = (props: any) => (
<AppNavigator
navigation={
addNavigationHelpers({
dispatch: {},
state: {},
})
}
/>
);