Inside of my component render()
method, I'm doing the following:
if (this.state.text) {
this.props.navigation.setOptions({
headerLeft: this.headerLeft,
});
} else {
this.props.navigation.setOptions({
headerLeft: this.headerDEFAULT,
});
}
I would like to leave headerLeft
as empty instead of this.headerDEFAULT
, to go back to its default state. How can that be done?