diff --git a/examples/expo/package.json b/examples/expo/package.json
index b1823aed7..80d5797b5 100644
--- a/examples/expo/package.json
+++ b/examples/expo/package.json
@@ -6,6 +6,9 @@
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
+ "dev:ios": "yarn dev && yarn ios",
+ "dev:android": "yarn dev && yarn android",
+ "dev": "cp ../../src/* node_modules/react-native-router-flux/src/",
"eject": "expo eject",
"lint": "yarn run eslint **/*.js",
"fix": "yarn run eslint **/*.js --fix",
diff --git a/examples/react-native/components/TabView.js b/examples/react-native/components/TabView.js
index b33f5932f..c8ac97f7e 100644
--- a/examples/react-native/components/TabView.js
+++ b/examples/react-native/components/TabView.js
@@ -102,6 +102,13 @@ class TabView extends React.Component {
>
Toggle NavBar
+
{this.props.name === 'tab_2_1' && (
)}
diff --git a/examples/react-native/package.json b/examples/react-native/package.json
index 38892262b..a77a7b027 100644
--- a/examples/react-native/package.json
+++ b/examples/react-native/package.json
@@ -4,6 +4,12 @@
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
+ "dev:start": "yarn dev && yarn start",
+ "ios": "react-native run-ios",
+ "android": "react-native run-android",
+ "dev:ios": "yarn dev && yarn ios",
+ "dev:android": "yarn dev && yarn android",
+ "dev": "cp ../../src/* node_modules/react-native-router-flux/src/",
"test": "jest",
"postinstall": "node_modules/.bin/rnrf dedup"
},
diff --git a/examples/react-native/yarn.lock b/examples/react-native/yarn.lock
index 077ce05d6..f99358865 100644
--- a/examples/react-native/yarn.lock
+++ b/examples/react-native/yarn.lock
@@ -4449,12 +4449,12 @@ react-native-message-bar@^2.0.10:
version "2.0.10"
resolved "https://registry.yarnpkg.com/react-native-message-bar/-/react-native-message-bar-2.0.10.tgz#34632bdf2cbfe0f51ae4f1e9a91c42b4394a11c2"
-"react-native-router-flux-cli@file:../packages/react-native-router-flux-cli":
+"react-native-router-flux-cli@file:../../packages/react-native-router-flux-cli":
version "0.0.1"
dependencies:
rimraf "^2.6.2"
-"react-native-router-flux@file:..":
+"react-native-router-flux@file:../..":
version "4.0.2-dev"
dependencies:
lodash.isequal "4.5.0"
diff --git a/examples/redux/package.json b/examples/redux/package.json
index 665399935..bc620e562 100644
--- a/examples/redux/package.json
+++ b/examples/redux/package.json
@@ -4,6 +4,11 @@
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
+ "ios": "react-native run-ios",
+ "android": "react-native run-android",
+ "dev:ios": "yarn dev && yarn ios",
+ "dev:android": "yarn dev && yarn android",
+ "dev": "cp ../../src/* node_modules/react-native-router-flux/src/",
"test": "jest",
"postinstall": "./node_modules/.bin/rnrf dedup"
},
diff --git a/src/navigationStore.js b/src/navigationStore.js
index a524fba57..d90f0e1db 100644
--- a/src/navigationStore.js
+++ b/src/navigationStore.js
@@ -350,7 +350,7 @@ function createNavigationOptions(params) {
res.tabBarOnPress = (data) => {
if (userDefinedTabBarOnPress) {
console.warn('backToInitial and tabBarOnPress were both defined and might cause unexpected navigation behaviors. I hope you know what you are doing ;-)');
- userDefinedTabBarOnPress(scene, jumpToIndex);
+ userDefinedTabBarOnPress(data);
}
if (data.navigation && data.navigation.state.index !== 0) {
data.navigation.dispatch(StackActions.popToTop());
@@ -625,7 +625,7 @@ class NavigationStore {
navigator, renderer, contentComponent, drawerWidth, drawerLockMode, tabBarPosition, lazy, duration, ...parentProps
} = scene.props;
let {
- legacy, tabs, modal, lightbox, overlay, drawer, transitionConfig, tabBarComponent,
+ legacy, tabs, modal, lightbox, overlay, drawer, transitionConfig, tabBarComponent
} = parentProps;
if (scene.type === Modal) {
modal = true;