mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* 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
31 lines
525 B
TypeScript
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: {},
|
|
})
|
|
}
|
|
/>
|
|
);
|