title: Unexpected token error in reactJS
body: <p>I'm trying to learn reactjs but I am bumping my head into an error and I cant understand how to get around it.</p>
  
  <p>here is the code : </p>
  
  <pre><code>import React , {Component} from 'react';
  import './App.css';
  import './footer.scss';
  
  
  function NumberList(props){
      const numbers = props.numbers;
      const listItems = numbers.map((numbers) =&gt;
          &lt;li&gt;{numbers}&lt;/li&gt;
      );
  
      return(
          &lt;ul&gt;{listItems}&lt;/ul&gt;
      );
  }
  
  
  const numbers = [1, 2, 3, 4];
  ReactDOM.render(
      &lt;NumberList numbers={numbers}/&gt;
      document.getElementById('root')
  );
  </code></pre>
  
  <p>and console is returning this : </p>
  
  <pre><code>/src/App.js
  Syntax error: Unexpected token, expected , (21:4)
  
    19 | ReactDOM.render(
    20 |     &lt;NumberList numbers={numbers}/&gt;
  &gt; 21 |     document.getElementById('root')
       |     ^
    22 | );
    23 | 
    24 | 
  </code></pre>
  
  <p>I would like some help to fix this problem. Im new to reactjs so please be nice.</p>
  
  <p>Thanks</p>
  
  <p>EDIT ; </p>
  
  <p>After fixing this error , my browser is returning this : </p>
  
  <pre><code>Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in.
  ▶ 14 stack frames were collapsed.
  (anonymous function)
  src/index.js:7
  
     4 | import registerServiceWorker from './registerServiceWorker';
     5 | import './index.css';
     6 | 
  &gt;  7 | ReactDOM.render(&lt;App /&gt;, document.getElementById('root'));
     8 | registerServiceWorker();
     9 | 
    10 | 
  
  View compiled
  ▶ 6 stack frames were collapsed.
  This screen is visible only in development. It will not appear if the app crashes in production.
  Open your browser’s developer console to further inspect this error.
  </code></pre>