React Navigation v6 usePreventRemoveContext is undefined error – React native
TypeError: (0, _$$_REQUIRE(_dependencyMap[1], "@react-navigation/native").usePreventRemoveContext) is not a function. (In '(0, _$$_REQUIRE(_dependencyMap[1], "@react-navigation/native").usePreventRemoveContext)()', '(0, _$$_REQUIRE(_dependencyMap[1], "@react-navigation/native").usePreventRemoveContext)' is undefined) This error is located at: in NativeStackViewInner (at NativeStackView.native.tsx:420) in RNCSafeAreaProvider (at SafeAreaContext.tsx:87) in SafeAreaProvider (at SafeAreaProviderCompat.tsx:46) in SafeAreaProviderCompat (at NativeStackView.native.tsx:419) in NativeStackView…