I'm trying to do a simple task of jumping from one screen to another, but no matter what I do it doesn't work. I have installed react-navigation/stack and react-navigation/native-stack but neither of them work with my existing code, is it because of the tabs?
import { NavigationContainer } from '@react-navigation/native'; import { createStackNavigator } from '@react-navigation/stack'; import Tabs from './navigation/tabs'; import "react-native-url-polyfill/auto" import LogInSignUp from './SettingsScreen/LogInSignUp'; const Stack = createStackNavigator(); const App = () => { return (); }; export default App; import { Text, StyleSheet, View, Button, } from "react-native"; import { StatusBar } from "expo-status-bar"; const Settings = (navigation) => { return ( ); } const styles = StyleSheet.create({ container: { flex: 1, alignItems: 'center', justifyContent: 'center', }, }) export default Settings import React from 'react' import { StackActions } from '@react-navigation/native'; const LogInSignUp = (navigation) => { return ( LogInSignUp) } export default LogInSignUp
I tried looking up tutorials that explain this problem, all their code looks like my code, just changing the name to my .js file, but nothing works.
Have you tried this hook
const navigation = useNavigation();