Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
if(response.status === 200){
setState(prevState => ({
...prevState,
'successMessage' : 'Registration successful. Redirecting to home page..'
}))
localStorage.setItem(ACCESS_TOKEN_NAME,response.data.token);
redirectToHome();
props.showError(null)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment