We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 790625f commit 44c52ccCopy full SHA for 44c52cc
public/html/single-file-example.html
@@ -11,14 +11,12 @@
11
</head>
12
<body>
13
<div id="root"></div>
14
- <script type="text/babel">
15
-
16
- ReactDOM.render(
17
- <h1>Hello, world!</h1>,
18
- document.getElementById('root')
19
- );
20
21
- </script>
+ <script type="text/javascript">
+ const root = ReactDOM.createRoot(document.getElementById('root'));
+ root.render(
+ <h1>Hello, world!</h1>
+ );
+</script>
22
<!--
23
Note: this page is a great way to try React but it's not suitable for production.
24
It slowly compiles JSX with Babel in the browser and uses a large development build of React.
0 commit comments