I would like to navigate to new screen only if login is successful, I tried using {Actions.HomeScreen} inside if condition but it does not do anything.
here is the code:
async login() {
const res = await api.getLoginResult();
const status= res.status;
console.log('log'+status);
if(status==='success'){
{Actions.HomeScreen;}
}
}