title: What is the best way to manage a user's session in React?
body: <p>I have a doubt about how to manage a user's session in React, for example in MVC .NET you only just do this using the Session object (e.g. <code>Session["test"] = "";</code>), but obviously React can not do this.</p>
  
  <p>I was reading about using the component state, I suppose that sets the state at the principal component and passes this state to other components using props. Also I saw people recommending the use the browser's <code>localStorage</code> or cookies, but I don't know if this if a good idea or practice. </p>
  
  <p>Is there a better way to manage sessions variables in React than <code>localStorage</code> or cookies?</p>