Navigate Back or pop doesnt fire componentmount,componentWillUpdate, componentWillReceiveProps ,... etc
Let me know how to rerender or refresh the parent screen(ie state need to be updated) when back button is pressed.
For example, I have a ListItem and Add Item screen and it navigates as ListItem > AddItem
when an Item is added in AddItem screen and on pressing back button, List Item screen need to get refreshed.
It would be good to have passProps in pop(), which might fire componentWillReceiveProps.
this.props.navigator.pop({
...
passProps: {},
...
})
This problem could be solved by either sync the data using Redux/MobX or listen to visibility events
how to reload screen in react-native
Most helpful comment
how to reload screen in react-native