Here is a snippet of code that outlines the NavigationBarRouteMapper:
var NavigationBarRouteMapper = {
...
,
RightButton(route, navigator, index, navState){
return(
<TouchableHighlight onPress={()=>{
//When this button is clicked, I want to update the Title in NavigationBarRouteMapper without changing the current route
}
}>
<Text>Button</Text>
</TouchableHighlight>
)
},
Title(route, navigator, index, navState){
//For example: if(route.name == 'ButtonPressed'){return <Text>New Title</Text>} else return null
After clicking the RightButton, I would like the Title to display as
<Text>New Title</Text>
If not, just show null. Is there a way to achieve this without modifying the current route?