Browse Source

Update single-file example

main
dan 3 years ago
committed by GitHub
parent
commit
1c5a6c137e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      static/html/single-file-example.html

11
static/html/single-file-example.html

@ -12,11 +12,14 @@
<body>
<div id="root"></div>
<script type="text/babel">
function MyApp() {
return <h1>Hello, world!</h1>;
}
ReactDOM.render(
<h1>Hello, world!</h1>,
document.getElementById('root')
);
const container = document.getElementById('root');
const root = ReactDOM.createRoot(container);
root.render(<MyApp />);
</script>
<!--

Loading…
Cancel
Save