-
Notifications
You must be signed in to change notification settings - Fork 0
/
map.html
40 lines (28 loc) · 1.07 KB
/
map.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
<html>
<head>
<title>map</title>
<script crossdomain src="https://unpkg.com/react@16/umd/react.development.js"> </script>
<script crossdomain src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"> </script>
<script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"> </script>
</head>
<body>
<div id = 'container'>
</div>
<script type = 'text/babel'>
function Navmenu(props)
{
const list = props.menuitems;
const updateList = list.map((listItems)=>{
return <li>{listItems}</li>;
});
return(
<ul>
{updateList}
</ul>
);
}
const menuItems = [1,2,3,4,5]
ReactDOM.render(<Navmenu menuitems={menuItems}/>, document.getElementById('container'));
</script>
</body>
</html>