I am new to reactjs and I enabled jshint. I wrote my first react code but I keep getting the following jshint error in line --> ReactDom.render.....:

E030 - Expected an identifier and instead saw '1'.

/*jshint esversion: 6 */

import React from 'react';
import ReactDOM from 'react-dom/client';

ReactDOM.render(<h1>Hello World</h1>, document.getElementById('root'));

This is my html:

<!DOCTYPE html>
<html lang="en">

<head>

  <title>React App</title>
</head>

<body>
  <div id="root"></div>
  <script type="text/babel" src="../src/index.js"></script>
</body>

</html> 
0

There are 0 best solutions below