title: How to retreive one information from a localStorage key?
body: <p>Is it possible to retreive one information from a localStorage key ?</p>
  <p>I have a key containing for example various information about the user after a connection :</p>
  <pre><code>{&quot;id&quot;:1,&quot;email&quot;:&quot;AnEmail@Gmail.com&quot;,&quot;roles&quot;:SimpleUser,&quot;iat&quot;:SomeNumber,&quot;exp&quot;:SomeNumber}
  </code></pre>
  <p>And one of my axios request is : passing the user id in the URL, like this :</p>
  <pre><code>export const getAllOfSomething = (userId) =&gt; axios.get(`${URL}/something/${userId}`,
  {
      userId: userId,
  });
  </code></pre>
  <p>Probably a stupid question but I'm still learning everything</p>
  <p>EDIT : I store my key like this when a connection is good :</p>
  <pre><code>const handleSubmit = event =&gt; {
          event.preventDefault();
          login(event.target.email.value, event.target.password.value).then(response =&gt; {
              const Token = response.data.accessToken;
              localStorage.setItem('UserToken', Token);
              User = jwt_decode(Token)
              localStorage.setItem('User', JSON.stringify(User))
               history.push({
                    pathname: '/',
               });
              window.location.reload(false);
  
          }).catch(err =&gt; {
              setErrorForm(err.response.data.message);
          });
      };
  </code></pre>
  <p>The first localStorage.setitem is to only store the JWT Token.</p>
  <p>The seconde one, I decode this Token to retrieve all the information about the user and this is what i get in my localStorage after decode :</p>
  <p><a href="https://i.stack.imgur.com/ss2WA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ss2WA.png" alt="enter image description here" /></a></p>