I have a component with few data that must be post to the server.I don't know this is the right way or not , but I need since the user press the post button in navbar , post function will be run inside component.
I don't know if this is the best way to do it, but it works:
Inside of the component in which you want to have right navbar button put this code
componentWillMount() {
Actions.refresh({ onRight: this.search, rightTitle: 'Search' });
}
Most helpful comment
I don't know if this is the best way to do it, but it works:
Inside of the component in which you want to have right navbar button put this code