title: Parsing error: Unexpected token, expected ","
body: <p>I have below code in react js.</p>
  
  <pre><code>class Posts extends Component {
    render() {
      return (
        {console.log('test')}
      );
    }
  }
  </code></pre>
  
  <p>After running this code I get error which is </p>
  
  <pre><code>Parsing error: Unexpected token, expected ","
  
     8 |     return (
  &gt;  9 |       {console.log('test')}
       |       ^
    10 |     );
    11 |   }
    12 | }
  </code></pre>
  
  <p>UPDATE</p>
  
  <p>wrapping it up with parent tag returns the same error</p>
  
  <pre><code>&gt;  9 |       &lt;div&gt;
       |       ^
    10 |         {console.log('nothing')}
    11 |       &lt;/div&gt;
  </code></pre>
  
  <p>UPDATE</p>
  
  <p>here is the whole class </p>
  
  <pre><code>import React, { Component } from 'react';
  import { connect } from 'react-redux';
  
  class Post extends Component {
    render() {
      return (
        &lt;div&gt;
          {console.log('test')}
        &lt;/div&gt;
      );
    }
  }
  
  const mapStateToProps = (state) =&gt; {
    return {
      posts: state
    }
  };
  
  export default Post;
  </code></pre>