title: window is undefined in react server rendering
body: <p>I'm using react and server side rendering. When rendering my component I need access to window object as I need to know the width on the window. I got sunch an error in the console:
  <a href="https://i.stack.imgur.com/zkRPS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zkRPS.png" alt="enter image description here"></a></p>
  
  <p>How can I use window object with server side rendering in react?</p>