title: How to set `contextType` on stateless component
body: <p>I am using the <code>React</code> context new API as below code. The last line will register the context into my component. I wonder how I can use the <code>contextType</code> for stateless component?</p>
  
  <pre><code>class MyClass extends React.Component {
    render() {
      let value = this.context;
      /* render something based on the value of MyContext */
    }
  }
  MyClass.contextType = MyContext;
  </code></pre>
  
  <p>I tried below code but it doesn't seem to work. The <code>context</code> in the component is empty object.</p>
  
  <pre><code>const MyClass = (props, context) =&gt; {
  ...
  }
  MyClass.contextType = MyContext;
  </code></pre>