forked from gribnoysup/react-yandex-maps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
umd-example.html
50 lines (41 loc) · 1.34 KB
/
umd-example.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
44
45
46
47
48
49
50
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>ReactYandexMaps with UMD module example</title>
<script src="https://unpkg.com/react/umd/react.production.min.js"></script>
<script src="https://unpkg.com/react-dom/umd/react-dom.production.min.js"></script>
<script src="https://unpkg.com/htm@2.1.1/dist/htm.js"></script>
<!-- <script src="./dist/development/react-yandex-maps.umd.js"></script> -->
<script src="./dist/production/react-yandex-maps.umd.js"></script>
</head>
<body>
<div id="root"></div>
<script>
const { YMaps, Map, Placemark } = ReactYandexMaps;
const html = htm.bind(React.createElement);
const center = [55.75, 37.57];
const App = () => html`
<${YMaps}>
<div>
My awesome application with maps!
<${Map} defaultState=${{ center, zoom: 9 }}>
<${Placemark}
defaultGeometry=${center}
instanceRef=${console.log}
/>
<//>
</div>
<//>
`;
ReactDOM.render(
html`
<${App} />
`,
document.getElementById('root')
);
</script>
</body>
</html>