diff --git a/example/src/StackWithDrawer.js b/example/src/StackWithDrawer.js index 2699808..adf881c 100644 --- a/example/src/StackWithDrawer.js +++ b/example/src/StackWithDrawer.js @@ -13,6 +13,10 @@ function Menu({ navigation }) { } class Fake extends React.Component { + static navigationOptions = ({ navigation }) => ({ + title: navigation.getParam('title'), + }); + render() { return ( @@ -37,6 +41,7 @@ const Drawer = createDrawerNavigator( }, { contentComponent: props => , + navigationOptions: { title: 'Example' } } ); diff --git a/example/yarn.lock b/example/yarn.lock index 3629bb6..7e71119 100644 --- a/example/yarn.lock +++ b/example/yarn.lock @@ -505,28 +505,25 @@ pouchdb-collections "^1.0.1" tiny-queue "^0.2.1" -"@react-navigation/core@^3.0.0-alpha", "@react-navigation/core@^3.0.0-alpha.4": - version "3.0.0-alpha.7" - resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-3.0.0-alpha.7.tgz#10116867febd74a371a7cc393c3dd6071e25ceae" - integrity sha512-aUbUAUgNpOppxj59E++S39gBiRCLlttzmwxeZoIJJ57q3IQ2vXNjXiAl66xJeRTIGT5GsEn0nOJO4YeSd5FOfQ== +"@react-navigation/core@^3.0.0-alpha": + version "3.0.0-alpha.17" + resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-3.0.0-alpha.17.tgz#fb5dd9bcb955d96e100acdb249093daec4d5ba71" + integrity sha512-VQNSwBddj6XQmNrpVqTjraghleEL3CFM9KTH3O5t20VHOAyrOyGnq7VgW+UvFkPlmEiCYiBh4ImDj6EkVx6saw== dependencies: create-react-context "^0.2.3" hoist-non-react-statics "^3.0.1" path-to-regexp "^1.7.0" query-string "^6.2.0" + react-is "^16.5.2" react-lifecycles-compat "^3.0.4" "@react-navigation/native@^3.0.0-alpha": - version "3.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/@react-navigation/native/-/native-3.0.0-alpha.5.tgz#479e8ab87a6305182a77c877eda30065a785eb21" - integrity sha512-UwQ2k63wZocCGVd+GqmzKhzvG4FpP8Riu5L+PdIsZOz2E0q4tqj0X/GulWkV0W5chB/oWsyXBi4+JmL92PFloQ== + version "3.0.0-alpha.9" + resolved "https://registry.yarnpkg.com/@react-navigation/native/-/native-3.0.0-alpha.9.tgz#2e34be133ba9a8b40eb1795e0f1841dc261e2a85" + integrity sha512-GPvoOydf9z6QHUU6A68pRU7g3J0wOkmsb/xWOLrJXBpZ+9GvnsSJk0L/9jaoYlX1pBrU22CTa9fGAIbtAKSV1w== dependencies: - "@react-navigation/core" "^3.0.0-alpha.4" hoist-non-react-statics "^3.0.1" - react-lifecycles-compat "^3.0.4" - react-native-gesture-handler "^1.0.8" react-native-safe-area-view "^0.11.0" - react-native-screens "^1.0.0-alpha.14" abbrev@1: version "1.1.1" @@ -2339,7 +2336,7 @@ expo-print@~1.0.0: babel-preset-expo "^4.0.0" expo-core "~1.1.0" -expo-react-native-adapter@~1.1.1: +expo-react-native-adapter@~1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/expo-react-native-adapter/-/expo-react-native-adapter-1.1.1.tgz#a8a4bcd8d17323924aac991ac727e9bcab9da6e1" integrity sha512-I2p+IOa3CWKbzbJuAgJaAAdmbZh4o+dfvP4zedDyIGMsma8i807nhqH/864le6/HHnuSJTphWSpRuvvUapw2OQ== @@ -2376,9 +2373,9 @@ expo-sms@~1.0.2: expo-permissions-interface "~1.1.0" expo@~30.0.0: - version "30.0.1" - resolved "https://registry.yarnpkg.com/expo/-/expo-30.0.1.tgz#2fae2d20b2f71d90e9533030d3671f70d4a18814" - integrity sha512-QyhASiKUIhVF3OWXQHqSvLE9v8F3YeKyeHhYMkB1nIb/J1cX7u/FTYUy921iBYw/S8YYOfEwoNyIGgOSJftXYg== + version "30.0.2" + resolved "https://registry.yarnpkg.com/expo/-/expo-30.0.2.tgz#f320f4f5d9da04746ebb6a478e5a11e56d14b7cd" + integrity sha512-+ImBKrtnSqkCmtmSYtclumkRQKfp6yEsyi/zlOVI0+9GFElkZ+1RPGLHaXGjEMz/va+RmFbJdkbsC6tbs+RHzw== dependencies: "@expo/vector-icons" "^6.3.1" "@expo/websql" "^1.0.1" @@ -2401,7 +2398,7 @@ expo@~30.0.0: expo-payments-stripe "~1.0.0" expo-permissions "~1.1.0" expo-print "~1.0.0" - expo-react-native-adapter "~1.1.1" + expo-react-native-adapter "~1.1.0" expo-sensors "~1.0.2" expo-sms "~1.0.2" fbemitter "^2.1.1" @@ -3433,9 +3430,9 @@ merge-stream@^1.0.1: readable-stream "^2.0.1" merge@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" - integrity sha1-dTHjnUlJwoGma4xabgJl6LBYlNo= + version "1.2.1" + resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.1.tgz#38bebf80c3220a8a487b6fcfb3941bb11720c145" + integrity sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ== metro-babylon7@0.30.2: version "0.30.2" @@ -3608,10 +3605,10 @@ micromatch@^3.1.4: snapdragon "^0.8.1" to-regex "^3.0.2" -"mime-db@>= 1.36.0 < 2", mime-db@~1.36.0: - version "1.36.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.36.0.tgz#5020478db3c7fe93aad7bbcc4dcf869c43363397" - integrity sha512-L+xvyD9MkoYMXb1jAmzI/lWYAxAMCPvIBSWur0PZ5nOf5euahRLVqH//FKW9mWp2lkqUgYiXPgkzfMUFi4zVDw== +"mime-db@>= 1.36.0 < 2", mime-db@~1.37.0: + version "1.37.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.37.0.tgz#0b6a0ce6fdbe9576e25f1f2d2fde8830dc0ad0d8" + integrity sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg== mime-db@~1.23.0: version "1.23.0" @@ -3626,11 +3623,11 @@ mime-types@2.1.11: mime-db "~1.23.0" mime-types@~2.1.18: - version "2.1.20" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.20.tgz#930cb719d571e903738520f8470911548ca2cc19" - integrity sha512-HrkrPaP9vGuWbLK1B1FfgAkbqNjIuy4eHlIYnFi7kamZyLLrGlo2mpcx0bBmNpKqBtYtAfGbodDddIgddSJC2A== + version "2.1.21" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.21.tgz#28995aa1ecb770742fe6ae7e58f9181c744b3f96" + integrity sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg== dependencies: - mime-db "~1.36.0" + mime-db "~1.37.0" mime@1.4.1: version "1.4.1" @@ -3677,9 +3674,9 @@ minimist@~0.0.1: integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= minipass@^2.2.1, minipass@^2.3.3: - version "2.3.4" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.4.tgz#4768d7605ed6194d6d576169b9e12ef71e9d9957" - integrity sha512-mlouk1OHlaUE8Odt1drMtG1bAJA4ZA6B/ehysgV0LUIrDHdKgo1KorZq3pK0b/7Z7LJIQ12MNM6aC+Tn6lUZ5w== + version "2.3.5" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.5.tgz#cacebe492022497f656b0f0f51e2682a9ed2d848" + integrity sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA== dependencies: safe-buffer "^5.1.2" yallist "^3.0.0" @@ -3787,12 +3784,12 @@ node-modules-regexp@^1.0.0: integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA= node-notifier@^5.2.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.2.1.tgz#fa313dd08f5517db0e2502e5758d664ac69f9dea" - integrity sha512-MIBs+AAd6dJ2SklbbE8RUDRlIVhU8MaNLh1A9SUZDUHPiZkWLFde6UNwG41yQHZEToHgJMXqyVZ9UcS/ReOVTg== + version "5.3.0" + resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.3.0.tgz#c77a4a7b84038733d5fb351aafd8a268bfe19a01" + integrity sha512-AhENzCSGZnZJgBARsUjnQ7DnZbzyP+HxlVXuD0xqAnvL8q+OqtSX7lGg9e8nHzwXkMMXNdVeqq4E2M3EUAqX6Q== dependencies: growly "^1.3.0" - semver "^5.4.1" + semver "^5.5.0" shellwords "^0.1.1" which "^1.3.0" @@ -4232,9 +4229,9 @@ query-string@^6.2.0: strict-uri-encode "^2.0.0" randomatic@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.0.tgz#36f2ca708e9e567f5ed2ec01949026d50aa10116" - integrity sha512-KnGPVE0lo2WoXxIZ7cPR8YBpiol4gsSuOwDSg410oHh80ZMp5EiypNqL2K4Z77vJn6lB5rap7IkAmcUlalcnBQ== + version "3.1.1" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.1.tgz#b776efc59375984e36c537b2f51a1f0aff0da1ed" + integrity sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw== dependencies: is-number "^4.0.0" kind-of "^6.0.0" @@ -4273,6 +4270,11 @@ react-devtools-core@3.1.0: shell-quote "^1.6.1" ws "^2.0.3" +react-is@^16.5.2: + version "16.6.0" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.6.0.tgz#456645144581a6e99f6816ae2bd24ee94bdd0c01" + integrity sha512-q8U7k0Fi7oxF1HvQgyBjPwDXeMplEsArnKt2iYhuIF86+GBbgLHdAmokL3XUFjTd7Q363OSNG55FOGUdONVn1g== + react-lifecycles-compat@3.0.4, react-lifecycles-compat@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" @@ -4292,15 +4294,6 @@ react-native-gesture-handler@1.0.6: invariant "^2.2.2" prop-types "^15.5.10" -react-native-gesture-handler@^1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-1.0.8.tgz#c2799741bf6443bb542892b0a36201a6d9ded209" - integrity sha512-Lc6PV5nKXgZdDeky96yi6gAM1UJHaYwzZbZyph0YuSv/L6vTtN+KPGsKyIENoOyxLJ/i43MSNn7fR+Xbv0w/xA== - dependencies: - hoist-non-react-statics "^2.3.1" - invariant "^2.2.2" - prop-types "^15.5.10" - react-native-maps@0.21.0: version "0.21.0" resolved "https://registry.yarnpkg.com/react-native-maps/-/react-native-maps-0.21.0.tgz#005f58e93d7623ad59667e8002101970ddf235c2" @@ -4339,7 +4332,7 @@ react-native-safe-module@^1.1.0: dependencies: dedent "^0.6.0" -react-native-screens@^1.0.0-alpha.14, react-native-screens@^1.0.0-alpha.5, react-native-screens@^1.0.0-alpha.9: +react-native-screens@^1.0.0-alpha.5, react-native-screens@^1.0.0-alpha.9: version "1.0.0-alpha.15" resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-1.0.0-alpha.15.tgz#5b5a0041310b46f12048fda1908d52e7290ec18f" integrity sha512-S2OM/ieD+Krk+0/Z2Vz2rTUWYud5hJgCRZqXRtqEfMgEcGI4FBopXp7mwXCGbA2PFLjZwZSwLlsZ6RX30WnjRw== @@ -4718,7 +4711,7 @@ sax@~1.1.1: resolved "https://registry.yarnpkg.com/sax/-/sax-1.1.6.tgz#5d616be8a5e607d54e114afae55b7eaf2fcc3240" integrity sha1-XWFr6KXmB9VOEUr65Vt+ry/MMkA= -"semver@2 || 3 || 4 || 5", semver@5.x, semver@^5.0.1, semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.4.1: +"semver@2 || 3 || 4 || 5", semver@5.x, semver@^5.0.1, semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0: version "5.6.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== @@ -5164,9 +5157,9 @@ typedarray@^0.0.6: integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= ua-parser-js@^0.7.18: - version "0.7.18" - resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.18.tgz#a7bfd92f56edfb117083b69e31d2aa8882d4b1ed" - integrity sha512-LtzwHlVHwFGTptfNSgezHp7WUlwiqb0gA9AALRbKaERfxwJoiX0A73QbTToxteIAuIaFshhgIZfqK8s7clqgnA== + version "0.7.19" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.19.tgz#94151be4c0a7fb1d001af7022fdaca4642659e4b" + integrity sha512-T3PVJ6uz8i0HzPxOF9SWzWAlfN/DavlpQqepn22xgve/5QecC+XMCAtmUNnY7C9StehaV6exjUCI801lOI7QlQ== uglify-es@^3.1.9: version "3.3.9" diff --git a/src/views/ScenesReducer.js b/src/views/ScenesReducer.js index f5b45a0..a5cc309 100644 --- a/src/views/ScenesReducer.js +++ b/src/views/ScenesReducer.js @@ -134,7 +134,7 @@ export default function ScenesReducer( let prevRoutes = prevState.routes; if (prevRoutes.length > prevState.index + 1) { console.warn( - 'Stack provided invalid state, index should always be the top route' + 'StackRouter provided invalid state, index should always be the top route' ); prevRoutes = prevRoutes.slice(0, prevState.index + 1); }