npx expo install @react-navigation/stack
npm install --save react-navigation
expo install react-native-gesture-handler react-native-reanimated react-native-screens react-native-safe-area-context @react-native-community/masked-view
npm install --save react-navigation-stack
import { createAppContainer } from 'react-navigation';
import { createStackNavigator } from 'react-navigation-stack';
function HomeScreen({ navigation: { navigate } }) {
return (
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
<Text>This is the home screen of the app</Text>
<Button
onPress={() =>
navigate('Profile', { names: ['Brent', 'Satya', 'Michaś'] })
}
title="Go to Brent's profile"
/>
</View>
);
}