-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUsers.jsx
More file actions
36 lines (34 loc) · 841 Bytes
/
Users.jsx
File metadata and controls
36 lines (34 loc) · 841 Bytes
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
'use strict';
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import User from "./User.jsx";
export default class Users extends Component{
static get propTypes(){
return{
users: PropTypes.array
}
}
constructor(props){
super(props);
}
render() {
const {users} = this.props;
return <div>
<table>
<thead>
<tr>
<th>ID </th>
<th>Name </th>
</tr>
</thead>
<tbody>
{
users.map(user => {
return <User key ={user.id} user={user}/>
})
}
</tbody>
</table>
</div>
}
}