I am going to navigate from screen A to screen B and finish the old screen A. In other words, I would like to go to the screen like android activity.
//Android Code
StartActivity(Intent);
finish();
I tried like this on react-native.
// A screen code
this.props.navigation.goBack(null);
this.props.navigation.navigate(B);
It works but the screen(saying screen X) just before screen A appears in a blink, and then goes to screen B. This is not a good UX experience. How can I go to screen B from screen A smoothly, without seeing screen X?