title: simple reactjs component having unexpected token error
body: <p>what is the error in this react component  ?</p>
  
  <pre><code>import React, { useState, useEffect } from 'react';
  import axios from 'axios';
  
  const Tasks = () =&gt; {
    const [tasks, setTasks] = useState([]);
    useEffect(() =&gt; {
      axios.get('/tasks').then(response =&gt; setTasks(response.data));
      return (
        &lt;ul&gt;
          {renderList(tasks)}
        &lt;/ul&gt;
      );
    },[]);
  };
  
  renderList(tasks) {
    console.log(tasks)
    return &lt;li&gt;dd&lt;/li&gt;
  }
  
  export default Tasks;
  </code></pre>
  
  <p>I can not figure out the error .. seems easy but i dont know where is my error .</p>
  
  <pre><code>    ./src/compononents/Tasks.js
    Line 16:  Parsing error: Unexpected token, expected ";"
  
    14 | };
    15 | 
  &gt; 16 | renderList(tasks) {
       |                   ^
    17 |   console.log(tasks)
    18 |   return &lt;li&gt;dd&lt;/li&gt;
    19 | }
  </code></pre>