I want to reload my screen after navigating using navigation.goBack() in react-native.
This is my code.
// navigation options
static navigationOptions = ({ navigation }) => {
const { params = {} } = navigation.state;
return {
headerTitle: "Comment",
headerTitleStyle: {
marginLeft: 0,
width: "100%",
textAlign: "center",
fontWeight: 'bold',
fontFamily: "helvetica",
},
headerStyle: {
paddingLeft: 10,
paddingRight: 10
},
headerLeft: (
<ClickableIcon
source={Close}
height={35}
width={35}
onIconPressed={() => {
navigation.goBack();
}}
/>
),
headerRight: <View />
};
};
how can I achieve this?