title: React native export class and singleton method
body: <p>I want to achieve something similar to how the Picker works in react native:</p>
  
  
  
  <pre class="lang-js prettyprint-override"><code>&lt;Picker&gt;
    &lt;Picker.Item /&gt;
  &lt;/Picker&gt;
  </code></pre>
  
  <p>But am unsure how I would export the class to achieve this.</p>
  
  <p>I currently have the following which I thought would work but I get an undefined react element error:</p>
  
  <pre class="lang-js prettyprint-override"><code>export default class extends React.Component {
    get Item () {
      return &lt;Text&gt;Foo&lt;/Text&gt;;
    }
  
    render () {
      return &lt;View&gt;&lt;/View&gt;;
    }
  }
  </code></pre>
  
  <blockquote>
    <p>React.createElement: type should not be null, undefined, boolean or
    number.</p>
  </blockquote>