Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

navigating to another screen from the react native navigation header

//pass in the navigation into the options like so and use it to navigate
options={({ navigation }) => ({
           title: 'Home',
              headerStyle: {
                backgroundColor: '#273469',
              },
              headerTintColor: '#EBF2FA',
              headerRight: () => (
                <Icon
                  onPress={() => navigation.navigate('ProfileScreen')}
                  name="edit"
                  type="material"
                />
              ),
            })}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #navigating #screen #react #native #navigation #header
ADD COMMENT
Topic
Name
2+6 =