title: How to access a browser cookie in a react app
body: <p>This question is a bit popular but Im not having such luck. Im mostly a backend person so Im learning as I go along.</p>
  
  <p>I have a cookie named <code>connect.sid</code> and value of <code>12345</code>. I see this in my chrome dev tools.</p>
  
  <p>In my react app I console logged <code>document.cookie</code> and <code>localStorage.getItem('connect.sid')</code>. Im getting null values. How to get the value of <code>12345</code>? </p>
  
  <p><a href="http://passportjs.org/" rel="noreferrer">Passportjs</a>, <a href="https://github.com/cfsghost/passport-github" rel="noreferrer">using passport-github2 strategy</a>, created this cookie. I need access to it so I could talk to my API.</p>
  
  <p>Thanks</p>