Created
June 20, 2022 16:39
-
-
Save urielhdz/f68ab0074478effb83a138eb206db2a3 to your computer and use it in GitHub Desktop.
React Hello world con importmaps
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
import React from "react"; | |
import ReactDOM from "react-dom"; | |
const root = ReactDOM.createRoot(document.getElementById('root')); | |
root.render("Hello world"); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
<script type="importmap"> | |
{ | |
"imports": { | |
"react": "https://ga.jspm.io/npm:[email protected]/dev.index.js", | |
"react-dom": "https://ga.jspm.io/npm:[email protected]/dev.index.js" | |
}, | |
"scopes": { | |
"https://ga.jspm.io/": { | |
"process": "https://ga.jspm.io/npm:@jspm/[email protected]/nodelibs/browser/process.js", | |
"scheduler": "https://ga.jspm.io/npm:[email protected]/dev.index.js" | |
} | |
} | |
} | |
</script> | |
</head> | |
<body> | |
<div id="root"></div> | |
<script src="/app.js" type="module" > </script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment