In the post Hello, React! with CodePen I showed on how to run React with the help of CodePen. In this post I’ll do the same locally but only with Notepad and again with no special code editor.
To get started open Notepad and insert the following code into it:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Hello, React!</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/17.0.2/umd/react.development.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/17.0.2/umd/react-dom.development.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.26.0/babel.min.js"></script>
<script type="text/babel">
const Greeting = ({name}) => <h1>Hello, {name}!</h1>;
ReactDOM.render(
<Greeting name="React" />,
document.getElementById('root')
);
</script>
</head>
<body>
<div id="root"></div>
</body>
</html>
One response to “Hello, React! with Notepad on Windows 10”
[…] the post Hello, React! with Notepad on Windows 10 I inserted all the JavaScript into a <script>-Element. In this post I’ll insert it into an […]