Back Button React Navigation
xxxxxxxxxx
// handling after back button event
navigation.pop(); // The B screen will delete
navigation.navigate("C"); // The C you are switching
//Alternatively, we can use replace:
navigation.replace("C"); // The B screen will put out for C
You have A, B, C screens. You are currently A, after touch component you entered B. Now you are in screen B. In screen B your code can execute like upper example: