-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
43 lines (42 loc) · 1.6 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!DOCTYPE html>
<html lang="en-US">
<!-- Simple index.html with in-browser jsx compilation -->
<head>
<title>App</title>
<script src="https://unpkg.com/lodash@4.17.21" crossorigin></script>
<script src="https://unpkg.com/react@16/umd/react.development.js" crossorigin></script>
<script src="https://unpkg.com/react-bootstrap@1.5.2/dist/react-bootstrap.js" crossorigin></script>
<script src="https://unpkg.com/react-router-dom@5.2.0/umd/react-router-dom.js" crossorigin></script>
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js" crossorigin></script>
<script src="https://unpkg.com/@babel/standalone@7.20.12/babel.js"></script>
<!-- Useful things
https://github.com/johndiiorio/react-useinterval/blob/master/src/index.tsx
https://github.com/dance2die/react-use-localstorage/blob/master/src/index.ts
-->
<!-- no 404 request for icon -->
<link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon">
<link href="https://getbootstrap.com/docs/4.6/dist/css/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
<style>
</style>
</head>
<body>
<div id="app"></div>
<script type="text/babel">
const { useState, useEffect, useRef } = React;
const { HashRouter, Link, Route, useRouteMatch } = ReactRouterDOM;
const { Dropdown } = ReactBootstrap;
const app = document.getElementById("app");
function App() {
const [ count, setCount ] = useState(0);
return (
<div>
<p>Edit me!</p>
<p>{count} <button onClick={(e) => setCount((oldCount) => oldCount + 1)}>+</button>
</p>
</div>
)
}
ReactDOM.render(React.createElement(App), document.getElementById("app"))
</script>
</body>
</html>