[[oktatas:telefon:react_native:navigacio|< Navigáció]] ====== Expo - Material Top Tabs ====== * **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/material-top-tab-navigator/ (2024) ===== Projekt létrehozása ===== npx create-expo-app app01 cd app01 npx expo install react-dom react-native-web @expo/webpack-config ===== Függőség telepítése ===== npm install @react-navigation/material-top-tabs react-native-tab-view Expo esetén szükséges még: npx expo install react-native-pager-view ===== Egyszerű példa ===== import { Text, View } from 'react-native'; import { NavigationContainer } from '@react-navigation/native'; import { createMaterialTopTabNavigator } from '@react-navigation/material-top-tabs'; function HomeScreen() { return ( Főoldal ); } function SettingsScreen() { return ( Beállítások ); } const Tab = createMaterialTopTabNavigator(); export default function App() { return ( ); } ===== Fejrész =====