I'm using createStackNavigator like this:
navigationOptions: ({ navigation }) => {
return {
title: 'Account Details',
headerLeft : <Back nav={ navigation } goto={'Profile'}/>,
headerRight: <Icon
name='check'
color='#fff'
onPress={() => **SOME FUNCTION** }
/>
}
}
This header loads in the 'Account Details' form, where they can edit their username etc. I want to use the 'check' Icon in the header to save the information entered.
Is there a way I can tell it to use a function that exists inside my 'Account Details' component, so I can access the state values from in there? Or somehow pass them back to the parent?
Thanks in advance.