I am using react native navigation and I need to update back button design which I have achieved by following code
static navigationOptions = {
title: '',
headerStyle: {
backgroundColor: '#544849',
},
tintColor: 'transparent',
headerLeft: <TouchableOpacity onPress={() => this.props.navigation.goBack()}><Image source={require('../../img/close.png')} style={{marginTop: 10, marginLeft:10}} /></TouchableOpacity>
};
But this way I get error undefined is not an object(evaluating r.props.navigation)
back button does nothing without onPress.