"Error de procesamiento. withNavigation solo se puede usar en una jerarquía de vista de un navegador. El componente envuelto no puede obtener acceso a la navegación desde accesorios o contexto" Cuando intento navegar a PrEntery donde tengo una FlatList, aparece este error . Cuando reemplazo FlatList con solo múltiples componentes, la navegación funciona bien.
//App.js const MainStackScreen = () => { return ( <NavigationContainer> <MainStack.Navigator screenOptions={{headerShown: false}} > <MainStack.Screen name = "Home" component ={Home}/> <MainStack.Screen name = "PrEntery" component = {PrEntery}/> </MainStack.Navigator> </NavigationContainer> ); }; export default MainStackScreen; //Home.js const Home = ({navigation}) => { return( <View style = {{height:'100%',width:'100%',backgroundColor:'#141212'}}> <SafeAreaView> <View style={{marginTop:200}}> <TouchableOpacity onPress={()=>{ navigation.navigate('PrEntery') }}> <HomeButton text = 'Enter PR'/> </TouchableOpacity> </View> <View style={{marginTop:40}}> <TouchableOpacity> <HomeButton text = 'Record Book'/> </TouchableOpacity> </View> </SafeAreaView> </View> ); }; export default Home; //PrEntery.js const renderItem = ({index}) => { return( <EnterPr text = {index}/> ); }; const PrEntery = () => { return( <View style = {{height:'100%',width:'100%',backgroundColor:'#141212'}}> <SafeAreaView> <FlatList data={LIFTS} renderItem = {renderItem} /> </SafeAreaView> </View> ); }; export default PrEntery;