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

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

Loading…
Cancel
Save