Handle login form
Hello everyone, I’m a newbie in the front end development, now i’m study how to handle the logins form and I have 2 problem:
1)After I send the request for login I have in response.data.role the role of user but I don’t understand how to save it correctly in the state.
2)How to redirect if the user role is correctly to home page(private route).
I attach screens bellow.
Thanks all ! 👏



0 Replies