Answer the question
In order to leave comments, you need to log in
How to do authentication with React&Redux?
I'm trying to do registration and login with React&Redux. I use LocalStorage for this. But I don’t know how to make a user’s personal page where he can add a to-do list. And so that each user has his own list. Is it possible to somehow implement this without the help of the API and Fetch and the help of the server? For example, through React Router. So far I have done registration and users are stored in an array, but now I need to make an entrance so that when the user successfully logs in, he will be redirected to his personal page. Tried to find some information but to no avail. Maybe there are some plugins that can help me. I can add code if needed. Thank you!
Answer the question
In order to leave comments, you need to log in
I would do it like...
A separate file a la DB.js (or state editorial) where I would store the data. Upon successful authorization (i.e. sucking data from the database), it would perform a function that redirects the user to his page.
Or just look at this page, it's certainly not word for word, but if you read it correctly, you can fish out something: How to implement redirect in react?
props.history.push('/hadpageUrl')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question