I would like to set up a React.js app only using either a local copy of the React.js scripts, or, only with the proper CDN links. React is registered only with CDN links, not with locally stored copies of React.js scripts. Why is that? Second, despite registering React while using only the CDN links, my element is not rendering. Why not? Do I have no choice but to use NPM to install everything?
<html>
<head>
<meta charset="UTF-8">
<title>First App</title>
</head>
<body>
<div id="app"></div>
<!-- This works (React is registering) -->
<script crossorigin src="https://unpkg.com/react@16/umd/react.development.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
<!-- This doesn't (React is NOT registering) -->
<!-- <script type="../scripts/react.development.js"></script> -->
<!-- <script type="../scripts/react.dom.js"></script> -->
<script>
console.log('App.js is running!');
var Template = React.createElement(
"h1",
{ id: "someid" },
"This is JSX from app"
)
// Identifying the element by id
var AppRoot = document.getElementById('app')
ReactDOM.render(Template, AppRoot)
</script>
</html>