I’ve just looked at this again and realised I was mistaken. All that’s needed is to follow the updated React Navigation install instructions:
expo install react-native-gesture-handler react-native-reanimated react-native-screens react-native-safe-area-context @react-native-community/masked-view
Before the above I also ran expo install react-navigation
. The changes to my package.json
look like this:
diff --git package.json package.json
index e2777e5..ac126d8 100644
--- package.json
+++ package.json
@@ -9,6 +9,7 @@
},
"dependencies": {
"@expo/vector-icons": "^10.0.6",
+ "@react-native-community/masked-view": "0.1.5",
"expo": "^36.0.0",
"expo-asset": "~8.0.0",
"expo-av": "~8.0.0",
@@ -19,12 +20,14 @@
"react-dom": "16.9.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz",
"react-native-gesture-handler": "~1.5.0",
- "react-native-paper": "^3.3.0",
+ "react-native-paper": "^3.5.1",
+ "react-native-reanimated": "~1.4.0",
+ "react-native-safe-area-context": "0.6.0",
"react-native-screens": "2.0.0-alpha.12",
"react-native-web": "^0.11.7",
- "react-navigation": "^4.0.10",
+ "react-navigation": "^4.1.0",
"react-navigation-backhandler": "^1.3.2",
- "react-navigation-stack": "^1.10.3"
+ "react-navigation-stack": "^2.0.16"
},
"devDependencies": {
"babel-preset-expo": "^8.0.0",
This worked for me, but it complained about some use of headerRight: <SomeComponent />
that I needed to change to headerRight: () => <SomeComponent />
to get rid of the warnings.