I am passing some params from screen A to screen B using the following code
props.navigation.navigate('ScreenB', {
"id": "1",
"name": "xyz"
});
The params are received on ScreenB and when I go back to Screen A and update the state and new params are passed to the navigate function, the new params are not received on Screen B instead it retains the old params passed to it.
I know that it has been mounted first hence react navigation doesn't re mount it and there are lifecycle events for React Navigation Lifecycle but I can't understand as to where the useFocusEffect hook is to be used so that the new params are passed and the Screen B is re-rendered
Thanks in advance