title: Error: Cannot call React.createContext because property createContext is missing in object type
body: <p>I am attempting to use the new React Context API in my application. My application is also using <code>flow</code> for types. As soon as I add <code>// @flow</code> to the top of a file that contains the code:</p>
  
  <pre><code>const MyContext = React.createContext()
  </code></pre>
  
  <p>I receive an error telling me:</p>
  
  <pre><code>Cannot call React.createContext because property createContext is missing in object type [1].
  </code></pre>
  
  <p>Where <code>object type [1]</code> is referring to a <a href="https://flow.org/en/docs/types/unions/" rel="nofollow noreferrer">union type</a> export from a flow types file for react, that contains types for <code>DOM</code>, <code>PropTypes</code>, <code>version</code>, <code>createClass</code>, etc. I imagine the best way to handle this would be to type <code>MyContext</code> to be something like:</p>
  
  <pre><code>const MyContext: Context = React.createContext()
  </code></pre>
  
  <p>But for the life of me I cannot find any such information on doing this. There seems to be no type definition for <code>Context</code>, or the return value of <code>React.createContext</code>. Has anyone ran into this issue, or know how to fix? </p>