It seems that many people struggle to make the initial hello world for React and I can seem to find a solution to my problem. Here is my test.js file:
import React from 'react';
import ReactDOM from 'react-dom';
ReactDOM.render(<h1>hello world</h1>, document.getElementById("root"));
and here is my html file:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
</head>
<body>
<p>Hello world should appear below: </p>
<div id="root"></div>
<!--React script-->
<script src="https://unpkg.com/react@16/umd/react.development.js" crossorigin></script>
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js" crossorigin></script>
<script src="https://unpkg.com/babel-standalone@6.26.0/babel.min.js"></script>
<script src="test.js"></script>
</body>
</html>
I am trying to follow the example given on this video and this the error that I am getting. I've tried adding type="modal", but it did not help. Error message