title: Why is window.location undefined in React Native?
body: <p>I'm trying to use <a href="https://www.npmjs.com/package/post-robot" rel="nofollow noreferrer">post-robot</a> to communicate with a <a href="https://facebook.github.io/react-native/docs/webview" rel="nofollow noreferrer">React Native WebView</a>. It's failing because post-robot is trying to access <code>window.location.href</code>. While <code>window</code> <a href="https://github.com/facebook/react-native/blob/master/Libraries/Core/setUpGlobals.js#L20" rel="nofollow noreferrer">is defined as a global</a> in React Native, it's missing <code>location</code>.</p>
  
  <p>This looks like it's intentional, rather than a bug. If it is intentional, is there a reason for this?</p>
  
  <p>Whether intentional or not, the best path forward isn't clear to me. I haven't found any other libraries like post-robot that do have React Native support.</p>
  
  <p>Edit:</p>
  
  <p>After digging a little more, I found another SO post from someone trying to use post-robot with React Native. There are no responses, and they don't mention if they ran into the same issue with <code>window.location</code> that I am: <a href="https://stackoverflow.com/questions/45008606/using-react-native-with-post-robot">Using React Native with post-robot</a></p>
  
  <p><a href="https://i.stack.imgur.com/Uw7YY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Uw7YY.png" alt="enter image description here"></a></p>