Update the title by setParams
class UserPage extends React.Component { | |
static navigationOptions: { | |
header: ({state}) => ({ | |
left: (<NavBarBackButton />), | |
title: ( | |
<UserPageTitle | |
userName={state.params.userName} | |
profilePicUrl={state.params.profilePicUrl} | |
/> | |
), | |
right: (<UserPageRight />), | |
}), | |
}; | |
updateNavBarTitle() { | |
this.props.navigation.setParams({ | |
userName: 'Yin', | |
profilePicUrl: 'http://www.example.com/myProfilePic.png', | |
}); | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment