text: var React = require('react');
  // the JSX transform converts to React, so we need to add it back in
  this['React'] = React;
  
  function Foo(props) {
    return <span>{props.name}</span>;
  }
  
  function Bar(props) {
    return <div>{props.name}</div>;
  }
  
  function App(props) {
    let Type = props.switch ? Foo : Bar;
  
    return <Type name={"Dominic"} />
  }
  
  App.getTrials = function(renderer, Root) {
    let results = [];
    renderer.update(<Root switch={false} />);
    results.push(['render with dynamic type', renderer.toJSON()]);
    renderer.update(<Root switch={true} />);
    results.push(['render with dynamic type update', renderer.toJSON()]);
    renderer.update(<Root switch={false} />);
    results.push(['render with dynamic type update', renderer.toJSON()]);
    return results;
  };
  
  if (this.__optimizeReactComponentTree) {
    __optimizeReactComponentTree(App);
  }
  
  module.exports = App;
  