Created
February 20, 2019 07:30
-
-
Save ascorbic/3b075105b49917975326f1d31b3bae2f to your computer and use it in GitHub Desktop.
Tiny parcel/React
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
<body> | |
<div id="root"></div> | |
<script src="index.tsx"></script> | |
</body> |
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 * as React from "react"; | |
import { render } from "react-dom"; | |
const App:React.SFC = () => <h1>Hello world</h1> | |
render(<App />, document.getElementById("root")); | |
if (module.hot) { | |
module.hot.accept(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment