TypeError: (0, _reactNativeSafeAreaContext.useSafeAreaInsets) is not a function
Full Error: (0, _reactNativeSafeAreaContext.useSafeAreaInsets) is not a function. (In '(0, _reactNativeSafeAreaContext.useSafeAreaInsets)()', '(0, _reactNativeSafeAreaContext.useSafeAreaInsets)' is undefined)
I'm using Expo and so installed it using that, and after reinstalling I still get the issue. Looking through the files on GitHub and those that are installed in my package in node_modules there are major differences, and one being that in the src folder there are no files that declare the useSafeAreaInsets or SafeAreaInsetsContext.
Edit: And I have I just checked, installing with npm does include the useSafeAreaInsets, so looks like it is an issue with the Expo install.
Turns out I needed to run the following commands
npm install -g expo-cli
expo update
To update my expo SDK and fix the packages so that it was using the correct ones.
In package.json update your react-native-safe-area-context to the newest version.
Example: "react-native-safe-area-context": "3.2.0",
In package.json update your react-native-safe-area-context to the newest version.
Example: "react-native-safe-area-context": "3.2.0",
Thanks man! This safe my project and you made me feel so happy. Life returns it to you multiplied by a million 🙏🏻