Created
August 29, 2022 12:40
-
-
Save qnighy/53dd0d0836b700cd8d522db020943112 to your computer and use it in GitHub Desktop.
React + JSX + ESM with single HTML
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="module" src="https://jspm.dev/@babel/standalone"></script> | |
<script type="text/jsx" data-type="module"> | |
import React from "https://jspm.dev/react"; | |
// import { createRoot } from "https://jspm.dev/react-dom/client"; | |
import { createRoot } from "https://jspm.dev/react-dom"; | |
const root = createRoot(document.querySelector("#main")); | |
root.render( | |
<div> | |
Hello, world! | |
</div> | |
); | |
</script> | |
<div id="main"></div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment