title: Dynamically Rendering a React Component in React 0.12
body: <p><a href="https://stackoverflow.com/questions/26518629/dynamically-rendering-a-react-component">I asked this question previously</a>, but with React 0.12 and the JSX changes it brought, I'm now seeking another way to implement this feature.</p>
  
  <p>Here's the code that works in React 0.11:</p>
  
  <pre><code>return React.createClass({
      render: function() {
  
        var Tag = React.DOM[this.props.element];
  
        return (
          &lt;Tag className='text'&gt;
            {this.props.value}
          &lt;/Tag&gt;
        );
      }
  });
  </code></pre>
  
  <p>I'm making a component that renders different DOM elements based on the prop passed in called "element".  this.props.element will be a value such as "p", "h1" or "h2" etc.  While this technically works, I'm seeing a warning message in the console:</p>
  
  <pre><code>Warning: Do not pass React.DOM.p to JSX or createFactory. Use the string "p" instead.
  Warning: Do not pass React.DOM.h2 to JSX or createFactory. Use the string "h2" instead.
  </code></pre>
  
  <p>Need some direction to help interpreting that warning and I can't find good documentation for how to do something like this.</p>