I am using onRightButton in the interactive NavigatorIOS. I would like to be able to call a function that is in the component that I click, but I cannot figure out how to achieve this. This is a sample code:
this.props.navigator.push({
component: SingleResultView,
title: "SomeTitle",
rightButtonIcon: require('image!mapsmarker'),
passProps: {
userPosition: this.props.userPosition
},
onRightButtonPress: () => { SingleResultView.foo(); } // NOT WORKING!
});
How can i do this?
source
share