Skip to content
This repository has been archived by the owner on Feb 25, 2020. It is now read-only.

Commit

Permalink
fix: upgrade react-navigation. closes #163
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Sep 19, 2019
1 parent 44d50c8 commit e644bad
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 35 deletions.
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"react-native-safe-area-view": "0.13.1",
"react-native-screens": "1.0.0-alpha.22",
"react-native-tab-view": "^2.10.0",
"react-navigation": "^4.0.4",
"react-navigation": "^4.0.5",
"react-navigation-stack": "^1.7.3"
},
"devDependencies": {
Expand Down
18 changes: 9 additions & 9 deletions example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -906,10 +906,10 @@
resolved "https://registry.yarnpkg.com/@react-native-community/netinfo/-/netinfo-2.0.10.tgz#d28a446352e75754b78509557988359133cdbcca"
integrity sha512-NrIzyLe0eSbhgMnHl2QdSEhaA7yXh6p9jzMomfUa//hoTXE+xbObGDdiWWSQm2bnXnZJg8XCU3AB9qzvqcuLnA==

"@react-navigation/core@^3.5.0":
version "3.5.0"
resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-3.5.0.tgz#73d1a12448e2bd71855e0080b95a7f51ede0cd9e"
integrity sha512-NLm24lA51R8o8c+iFnwtN9elqRzm4OJ8f1qPBCUNIYW1sb8M5yCD53vRP0fRcPFpr/6Xzs2TJMsWnnebwFp0Rw==
"@react-navigation/core@^3.5.1":
version "3.5.1"
resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-3.5.1.tgz#7a2339fca3496979305fb3a8ab88c2ca8d8c214d"
integrity sha512-q7NyhWVYOhVIWqL2GZKa6G78YarXaVTTtOlSDkvy4ZIggo40wZzamlnrJRvsaQX46gsgw45FAWb5SriHh8o7eA==
dependencies:
hoist-non-react-statics "^3.3.0"
path-to-regexp "^1.7.0"
Expand Down Expand Up @@ -4594,12 +4594,12 @@ react-navigation-stack@^1.7.3:
dependencies:
prop-types "^15.7.2"

react-navigation@^4.0.4:
version "4.0.4"
resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-4.0.4.tgz#afa43c7183891d38708cf57f1d4394fed1d4c2ad"
integrity sha512-MZeVkYkFTKZobhrXMV3Hgeg0HHeokCrYsbxActVfO0n6zfzm0/La6EiC2mIHiwOymvb1ZygyFf90vryLUMEBNA==
react-navigation@^4.0.5:
version "4.0.6"
resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-4.0.6.tgz#6e0c4324c8eb314f31b510a43cbf7cea9410f246"
integrity sha512-DEhAcuiPI+I8pEgKStVrhDjZA5bc/1Nc+ByKWPn1pVWJCRHs+i+vJ6D2KWZCUtpzKCSm/yVPyUab4hOCg8L+Ww==
dependencies:
"@react-navigation/core" "^3.5.0"
"@react-navigation/core" "^3.5.1"
"@react-navigation/native" "^3.6.2"

react-proxy@^1.1.7:
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"react-native": "~0.57.1",
"react-native-gesture-handler": "^1.4.1",
"react-native-reanimated": "^1.2.0",
"react-navigation": "^4.0.4",
"react-navigation": "^4.0.5",
"react-test-renderer": "16.5.0",
"release-it": "^10.3.1",
"typescript": "^3.5.2"
Expand All @@ -85,7 +85,7 @@
"react-native-gesture-handler": "^1.0.0",
"react-native-reanimated": "^1.0.0-alpha",
"react-native-screens": "^1.0.0 || ^1.0.0-alpha",
"react-navigation": "^4.0.4"
"react-navigation": "^4.0.5"
},
"husky": {
"hooks": {
Expand Down
16 changes: 2 additions & 14 deletions src/utils/createTabNavigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,7 @@ export default function createTabNavigator<
Config extends {},
Options extends NavigationCommonTabOptions,
Props extends NavigationViewProps & CommonProps
>(
TabView: React.ComponentType<Props & Config & Options>
): (
routes: RouteConfig<Options>,
config?: CreateNavigatorConfig<
Partial<Config>,
NavigationTabRouterConfig,
Partial<Options>,
NavigationTabProp<NavigationRoute, any>
>
) => React.ComponentType<{}> {
>(TabView: React.ComponentType<Props & Config & Options>) {
class NavigationView extends React.Component<
Exclude<Props, NavigationViewProps> & ExtraProps<Config>
> {
Expand Down Expand Up @@ -265,8 +255,6 @@ export default function createTabNavigator<
) => {
const router = TabRouter(routes, config as any);

// TODO: don't have time to fix it right now
// @ts-ignore
return createNavigator(NavigationView, router, config as any);
return createNavigator(NavigationView as any, router, config as any);
};
}
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1225,10 +1225,10 @@
optionalDependencies:
jetifier "^1.0.0-beta04.2"

"@react-navigation/core@^3.5.0":
version "3.5.0"
resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-3.5.0.tgz#73d1a12448e2bd71855e0080b95a7f51ede0cd9e"
integrity sha512-NLm24lA51R8o8c+iFnwtN9elqRzm4OJ8f1qPBCUNIYW1sb8M5yCD53vRP0fRcPFpr/6Xzs2TJMsWnnebwFp0Rw==
"@react-navigation/core@^3.5.1":
version "3.5.1"
resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-3.5.1.tgz#7a2339fca3496979305fb3a8ab88c2ca8d8c214d"
integrity sha512-q7NyhWVYOhVIWqL2GZKa6G78YarXaVTTtOlSDkvy4ZIggo40wZzamlnrJRvsaQX46gsgw45FAWb5SriHh8o7eA==
dependencies:
hoist-non-react-statics "^3.3.0"
path-to-regexp "^1.7.0"
Expand Down Expand Up @@ -7672,12 +7672,12 @@ react-native@~0.57.1:
xmldoc "^0.4.0"
yargs "^9.0.0"

react-navigation@^4.0.4:
version "4.0.4"
resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-4.0.4.tgz#afa43c7183891d38708cf57f1d4394fed1d4c2ad"
integrity sha512-MZeVkYkFTKZobhrXMV3Hgeg0HHeokCrYsbxActVfO0n6zfzm0/La6EiC2mIHiwOymvb1ZygyFf90vryLUMEBNA==
react-navigation@^4.0.5:
version "4.0.6"
resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-4.0.6.tgz#6e0c4324c8eb314f31b510a43cbf7cea9410f246"
integrity sha512-DEhAcuiPI+I8pEgKStVrhDjZA5bc/1Nc+ByKWPn1pVWJCRHs+i+vJ6D2KWZCUtpzKCSm/yVPyUab4hOCg8L+Ww==
dependencies:
"@react-navigation/core" "^3.5.0"
"@react-navigation/core" "^3.5.1"
"@react-navigation/native" "^3.6.2"

react-proxy@^1.1.7:
Expand Down

0 comments on commit e644bad

Please sign in to comment.