Need suggestion and advice,
I am using the below 2 lines of code in react native expo component,
this.props.navigation.navigate("App"); patchUser(this.state.dataSource.userInfo.username, this.state.dataSource.userInfo.firstName,this.state.dataSource.userInfo.lastName, this.state.dataSource.lastLoginTime);
Will "patchUser()" be called always, since this.props.navigation.navigate("App") has been executed before and it takes to another component ?
When navigating to "App", the screen with your code snippet above remains mounted, as described here. Therefore, your code should still execute.
Answered By – FredAstaire
Answer Checked By – Robin (AngularFixing Admin)