Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

stack navigator navigate

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>
  );
}
 
PREVIOUS NEXT
Tagged: #stack #navigator #navigate
ADD COMMENT
Topic
Name
1+6 =