Skip to content

Instantly share code, notes, and snippets.

@ascorbic
Created February 20, 2019 07:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ascorbic/3b075105b49917975326f1d31b3bae2f to your computer and use it in GitHub Desktop.
Save ascorbic/3b075105b49917975326f1d31b3bae2f to your computer and use it in GitHub Desktop.
Tiny parcel/React
<body>
<div id="root"></div>
<script src="index.tsx"></script>
</body>
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