Export getNavigation as public API, test redux (#4488)

This unblocks the fixing of react-navigation-redux-helpers to unbreak redux support in 2.3

https://github.com/react-navigation/react-navigation-redux-helpers/pull/37

All redux users will need to change their code to reflect the changes made here to `ReduxExample/AppNavigator`
This commit is contained in:
Eric Vicenti 2018-06-12 11:30:23 -07:00 committed by Brent Vatne
parent d3ef3d1271
commit 0adb1ba9f1
6 changed files with 2395 additions and 1864 deletions

View File

@ -5758,9 +5758,9 @@ react-navigation-deprecated-tab-navigator@1.3.0:
dependencies:
react-native-tab-view "^0.0.77"
react-navigation-drawer@0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/react-navigation-drawer/-/react-navigation-drawer-0.2.0.tgz#906f78c35f82f6ee39c3ca1d275f1a71e80e2c57"
react-navigation-drawer@0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/react-navigation-drawer/-/react-navigation-drawer-0.3.0.tgz#641007213f0f1e1b55a0a4bb64d71df07b3e7208"
dependencies:
react-native-drawer-layout-polyfill "^1.3.2"
@ -5789,9 +5789,9 @@ react-navigation-tabs@0.2.0-rc.0:
react-native-safe-area-view "^0.7.0"
react-native-tab-view "~0.0.77"
react-navigation-tabs@0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/react-navigation-tabs/-/react-navigation-tabs-0.5.0.tgz#74d5511270742a0b67c46fe65a1b19e553763819"
react-navigation-tabs@0.5.1:
version "0.5.1"
resolved "https://registry.yarnpkg.com/react-navigation-tabs/-/react-navigation-tabs-0.5.1.tgz#ed33bce3a3e21b92646700de25bd94b8fc570371"
dependencies:
hoist-non-react-statics "^2.5.0"
prop-types "^15.6.1"

View File

@ -12,7 +12,7 @@
"icon": "./assets/icons/react-navigation.png",
"hideExponentText": false
},
"sdkVersion": "25.0.0",
"sdkVersion": "27.0.0",
"entryPoint": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
"packagerOpts": {
"assetExts": ["ttf", "mp4"]

View File

@ -21,10 +21,10 @@
]
},
"dependencies": {
"expo": "^25.0.0",
"expo": "^27.0.0",
"prop-types": "^15.5.10",
"react": "16.2.0",
"react-native": "^0.52.0",
"react": "16.3.1",
"react-native": "^0.55.0",
"react-navigation": "link:../..",
"react-navigation-redux-helpers": "^1.0.0",
"react-redux": "^5.0.6",
@ -32,6 +32,7 @@
},
"devDependencies": {
"babel-jest": "^22.4.1",
"flow-bin": "^0.74.0",
"jest": "^22.1.3",
"jest-expo": "^25.1.0",
"react-native-scripts": "^1.3.1",

View File

@ -27,8 +27,14 @@ class AppWithNavigationState extends React.Component {
render() {
const { dispatch, nav } = this.props;
const navigation = navigationPropConstructor(dispatch, nav);
return <AppNavigator navigation={navigation} />;
this._navigation = navigationPropConstructor(
dispatch,
nav,
AppNavigator.router,
() => this.props.screenProps,
() => this._navigation
);
return <AppNavigator navigation={this._navigation} />;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -8,6 +8,9 @@ module.exports = {
get StateUtils() {
return require('./StateUtils').default;
},
get getNavigation() {
return require('./getNavigation').default;
},
// Navigators
get createNavigator() {