[[oktatas:telefon:react_native:navigacio|< Navigáció]]
====== Expo - Native Stack ======
* **Szerző:** Sallai András
* Copyright (c) 2024, Sallai András
* Licenc: [[https://creativecommons.org/licenses/by-sa/4.0/|CC Attribution-Share Alike 4.0 International]]
* Web: https://szit.hu
===== Bevezetés =====
Webhely:
* https://reactnavigation.org/docs/native-stack-navigator (2024)
===== Projekt létrehozása =====
npx create-expo-app app01
cd app01
npx expo install react-dom react-native-web @expo/webpack-config
===== Probléma fixálása =====
{
"expo": {
"web": {
"bundler": "metro"
}
}
}
npx expo install @expo/metro-runtime
===== Native Stack telepítés =====
npm install @react-navigation/native-stack
===== Minőségbiztosítás példa =====
import { Button, View, Text } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
function HomeScreen({ navigation }) {
return (
Minőség
);
}
function SubjectScreen({ navigation }) {
return (
);
}
function TeacherScreen({ navigation }) {
return (
navigation.navigate('Questions')}
/>
navigation.goBack()} />
);
}
function QuestionsScreen({ navigation }) {
return (
navigation.goBack()} />
);
}
const Stack = createNativeStackNavigator();
function QualityStack() {
return (
);
}
export default function App() {
return (
);
}