Kind of a beginner with React so I have a question about users and how I can reuse the data after you are being signed in.
So in PHP I could check if you where signed in by running <?php if(isset($_SESSION['user']){}) ?>
, what I wanna know is how this is done with React?
My backend is based on PHP sending JSON data back and forth. One of these requests is when you sign in. I currently store the data in localStorage
but also want to display different data on some pages depending on signed in status, and I wanna display user data in the middle of the page like a Welcome back (user)!
.
Whats the best method of doing this? Preferably without with whats built into Reactjs.