title: How to call a function inside the div React Component jsx
body: <p>This is the Component constructor and I've already bind the function checkActive which compares the props from parent component with the argument.</p>
  
  <pre><code>constructor(props) {
      super(props);
  
      this.checkActive = this.checkActive.bind(this);
    }
  
    checkActive(option) {
      if (this.props.active === option) {
        return 'active';
      }
    }
  </code></pre>
  
  <p>I would like to render 'active' to one of my div. So I start with:</p>
  
  <pre><code>&lt;div {this.checkActive('meet')}&gt;
  </code></pre>
  
  <p>I want to render it to : <code>&lt;div active&gt;</code></p>
  
  <p>The error shows: <strong>Unexpected token, expected ...</strong></p>
  
  <p>Did I make the function wrong or we cannot pass the function inside the div?</p>