title: Set Heading Level With Props React
body: <p>Just wondering if there is anyway to set heading levels by passing props down to the base component.</p>
  
  <p>Example:</p>
  
  <p><strong>Base Component</strong></p>
  
  <pre><code>class Heading extends Component {
   render() {
    return (
      &lt;h{this.props.headinglevel} className={this.props.titleStyle}&gt;
          {this.props.title}
      &lt;/h{this.props.headinglevel}&gt;
    );
   }
  }
  export default Heading;
  </code></pre>
  
  <p><strong>Parent Component (Passing Props)</strong></p>
  
  <pre><code>class HomeHeader extends Component {
   render() {
    return (
        &lt;Heading headinglevel="1" titleStyle="big-header" title="Hello World" /&gt;
    )
   }
  }
  
  export default HomeHeader;
  </code></pre>
  
  <p>When I try this I get a syntax error.</p>