





Studia grazie alle numerose risorse presenti su Docsity
Guadagna punti aiutando altri studenti oppure acquistali con un piano Premium
Questa pagina non è visibile nell’anteprima
Non perderti parti importanti!






Crea progetto 1 Installazione expo e npm 1 Npm installazioni cd C:\Users\icts21-23.016base 1 Sostituire prima pagina con un’altra (BottomStack → barra inferiore di navigazione) 2 Aggiungere pagina di dettaglio 5
//crea progetto expo init nome_progetto (minimal) cd nome_progetto expo start {/* */} commento nella parte del return
//installazione https://dev.to/runosaduwa/how-to-install-react-native-with-expo-quick-easy-4j8j //file node da scaricare https://nodejs.org/en/ controllo se si è installato : node --version npm --version //expo sudo npm install -g expo-cli windows Z:>C: cd C:\Users\icts21-23. cd Desktop Error
Unable to find expo in this project - have you run yarn / npm install yet? ● npm install
npm install @react-navigation/native npm i @react-navigation/bottom-tabs npm i @react-navigation/native-stack
App.js import React from "react"; import { NavigationContainer } from '@react-navigation/native'; //navigation import BottomStack from "./src/navigation/BottomStack"; const App = () => { return (
</Stack.Navigator> ); }; export default AnimeStack; /screens AnimePage.js import React from "react"; import {View, Text, StyleSheet} from "react-native"; const AnimePage = ({ navigation }) => { return (
App.js import React from "react"; import { NavigationContainer } from '@react-navigation/native'; //navigation import BottomStack from "./src/navigation/BottomStack"; const App = () => { return (
headerTitleStyle: { fontWeight: 'bold', }, }} /> <Stack.Screen name="AnimeDetail" component={AnimeDetail} options={{ title: 'Dettaglio anime', headerStyle: { backgroundColor: 'rgb(80, 54, 97)', }, headerTintColor: 'white', headerTitleStyle: { fontWeight: 'bold', }, }} /> </Stack.Navigator> ); }; export default AnimeStack; /screens AnimePage.js import React from "react"; import { View, Text, StyleSheet } from "react-native"; import CustomButton from "../../extraMaterial/components/CustomButton"; const AnimePage = ({ navigation }) => { return (
fontSize: 20, textAlign: 'center', margin: 10, color: 'white', }, }); export default AnimePage; AnimeDetail.js import React from "react"; import { View, Text, StyleSheet } from "react-native"; const AnimeDetail = ({ navigation }) => { return (