JavaScript React Basics First Steps in React Render an Element

for some reason the react cdn appears to not be working

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Scoreboard</title> <link rel="stylesheet" href="./app.css" /> </head>

<body> <div id="root"></div>

----> <script crossorigin "https://unpkg.com/react@16/umd/react.production.min.js"></script> ---> <script crossorigin src="https://unpkg.com/react-dom@16/umd/react- dom.production.min.js"></script> <script src="./app.js"></script> </body> </html>

2 Answers

KRIS NIKOLAISEN
KRIS NIKOLAISEN
54,172 Points

Check these two lines in your html:

added missing src=

<script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script> 

removed space in react-dom

<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>

I think I fixed it for some reason the cross origin was messing it up so I took it out is that needed ?

I checked the src they are both there