title: How to provide dynamic className to element in React Class render method
body: <p>I have a ReactClass with name Alert. Its render method returns a div with class <code>alert alert-success</code> or <code>alert alert-error</code> according to the type passed while creating element. I just want to know how to add class based on the type of alert element.</p>
  
  <p>Here is my attempt: </p>
  
  <pre><code>var Alert = ReactClass({
    render: function() {
      return &lt;div className="alert {this.props.type}"&gt;{this.props.message}&lt;/div&gt;
    }
  });
  
  var successAlert = React.createElement(Alert, {
    type: 'alert-success'
    message: 'Information saved successfully!!'
  });
  </code></pre>
  
  <p>When JSX Template is compiled <code>this.props.type</code> is not converted to the class passed to element. How to achieve this ?</p>