Compare commits

..

5 Commits

Author SHA1 Message Date
satyajit.happy
2433071930 chore: release 4.0.6 2019-09-19 16:49:24 +02:00
satyajit.happy
dd03234e2d fix: fix typings for switch navigator. fixes #6310 2019-09-19 16:46:28 +02:00
satyajit.happy
3bd15d3f8b refactor: don't use export * to reexport deprecations 2019-09-19 16:30:32 +02:00
Nicholas Lee
2b27bcd134 fix: fix the type of NavigationJumpToActionPayload (#6210)
As mentioned in https://reactnavigation.org/docs/en/switch-actions.html
the param which's name is 'key' of `SwitchActions.jumpTo()`  should be optional
2019-09-16 13:07:43 +02:00
Jeremy
3aee211c73 docs: add the readme back into example (#6284) 2019-09-16 13:01:55 +02:00
4 changed files with 43 additions and 6 deletions

12
example/README.md Normal file
View File

@@ -0,0 +1,12 @@
# Navigation Playground Example
The NavigationPlayground example app includes a variety of patterns and is used as a simple way for contributors to manually integration test changes.
## Usage
```bash
yarn bootstrap # in the react-navigation root directory
yarn example start
```
You can view this example application directly on Android phones by visiting scanning the QR code on [this site](https://exp.host/@react-navigation/NavigationPlayground) with the [Expo app](https://play.google.com/store/apps/details?id=host.exp.exponent&hl=en).

View File

@@ -1,6 +1,6 @@
{
"name": "react-navigation",
"version": "4.0.5",
"version": "4.0.6",
"description": "Routing and navigation for your React Native apps",
"main": "src/react-navigation.js",
"types": "typescript/react-navigation.d.ts",

View File

@@ -1,4 +1,29 @@
export * from '@react-navigation/core';
export * from '@react-navigation/native';
export * from './deprecations';
// Export each item individually so that they can be evaluated lazily
// https://babeljs.io/docs/en/babel-plugin-transform-modules-commonjs#lazy
export {
createNavigationContainer,
createStackNavigator,
createBottomTabNavigator,
createMaterialTopTabNavigator,
createDrawerNavigator,
StackGestureContext,
DrawerGestureContext,
DrawerRouter,
DrawerActions,
Transitioner,
StackView,
StackViewCard,
StackViewTransitionConfigs,
Header,
HeaderTitle,
HeaderBackButton,
HeaderStyleInterpolator,
DrawerView,
DrawerItems,
DrawerSidebar,
BottomTabBar,
MaterialTopTabBar,
} from './deprecations';

View File

@@ -345,7 +345,7 @@ declare module 'react-navigation' {
export interface NavigationJumpToActionPayload {
routeName: string;
key: string;
key?: string;
params?: NavigationParams;
}
@@ -619,7 +619,7 @@ declare module 'react-navigation' {
export function createSwitchNavigator(
routeConfigMap: NavigationRouteConfigMap<SwitchNavigatorConfig, NavigationScreenProp<NavigationRoute>>,
switchConfig?: SwitchNavigatorConfig
): NavigationContainer;
): NavigationNavigator<{}, NavigationProp<NavigationState>>;
/**
* NavigationActions
@@ -754,9 +754,9 @@ declare module 'react-navigation' {
export function createNavigator<S, Options>(
view: NavigationView<Options, S>,
router: NavigationRouter<S, Options>,
navigatorConfig?: {} | null,
navigatorConfig?: {},
navigatorType?: NavigatorType
): any;
): NavigationNavigator<Options, NavigationProp<NavigationState>>;
/**
* Create an HOC that injects the navigation and manages the navigation state