title: Transpiling jsx using babel for react app
body: <p>I am trying to transpile a jsx file using babel and its giving an error.</p>
  
  <p>The content of the file is as follows, (<code>src/app.js</code>)</p>
  
  <pre><code>class Channel extends React.Component{
      render() {
          return(
              &lt;li&gt; Something &lt;/li&gt;
          )
      }
  }
  </code></pre>
  
  <p>I used the following commands to transpile and watch the file for changes.</p>
  
  <pre><code>1) babel src/app.js --watch --out-file js/app.js
  2) babel src/app.js --presets es2015 --watch --out-file js/app.js
  </code></pre>
  
  <p>In both the cases I recieved the following error,</p>
  
  <pre><code>SyntaxError: src/app.js: Unexpected token (4:12)
    2 |     render() {
    3 |         return(
  &gt; 4 |             &lt;li&gt; Something &lt;/li&gt;
      |             ^
    5 |         )
    6 |     }
    7 | }
  </code></pre>
  
  <p>It shows that the error is at the start of the html tags embedded in the javascript file (jsx). Babel is expected to know the html tags and treat it and compile it, but I don't know why does it behave like that. </p>
  
  <p>Note: I installed babel using the babel documentation from the official website.</p>