Extremely simple HTML & JS set up for react not working, I followed exactly the instructions in the react website but it is not working. If anyone can see any errors I would appreciate it, I just followed exactly the instructions on the react website... Also, even the document.getElementById
command is not even working as shown in the error message on the screenshot... Thanks in advance.
HTML code (extremely simple):
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div id="root"></div>
<script src="https://unpkg.com/react@17/umd/react.development.js" crossorigin></script>
<script src="https://unpkg.com/react-dom@17/umd/react-dom.development.js" crossorigin></script>
<!-- Load our React component. -->
<script src="file1.js"></script>
</body>
</html>
Via Active questions tagged javascript - Stack Overflow https://ift.tt/EnORl9u
Comments
Post a Comment