React navigation goBack() and update parent state
You can pass a callback function as parameter when you call navigate like this: const DEMO_TOKEN = await AsyncStorage.getItem(‘id_token’); if (DEMO_TOKEN === null) { this.props.navigation.navigate(‘Login’, { onGoBack: () => this.refresh(), }); return -3; } else { this.doSomething(); } And define your callback function: refresh() { this.doSomething(); } Then in the login/registration view, before goBack, you … Read more