I am trying to setup an application with @react-navigation.
I have installed all the required dependencies:
"@react-navigation/bottom-tabs": "^5.4.2",
"@react-navigation/native": "^5.3.0",
"@react-navigation/stack": "^5.3.2",
"react-native-safe-area-context": "^1.0.0",
react-native-screens": "^2.7.0",
"@react-native-community/masked-view": "^0.1.10",
"react-native-reanimated": "^1.8.0",
"react-native-gesture-handler": "^1.6.1",
When launching the application I receive errors regarding 'measureInWindow'.
wrapNativeSuper.js:10 Unhandled JS Exception: TypeError: Cannot read property 'measureInWindow' of undefined
This would appear to relate to the react-native-safe-area-context
per some research but I am unable to figure out why that doesn't work. I have pod installed since adding the libraries and rebuilt the application, but the same error persists. If I remove react-native-safe-area-context
then react-navigation will complain it is not added.
This question is related but the answer suggests updating react-navigation and I am on the latest version: TypeError: Cannot read property 'measureInWindow' of undefined - This question also mentions react-native-safe-area-view
but I believe react-navigation no longer uses this in favour of -safe-area-context.
This issue on react-navigation seems to relate (https://github.com/react-navigation/react-navigation/issues/7933) but it suggests react-native-safe-area-view is in use and there is a new version (that is not published?)