Created
October 13, 2018 12:41
-
-
Save whtswrng/c1e53f4dfb7168076c330536af870d19 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class PopulatedUserList extends Component { | |
render() { | |
return ( | |
<div> | |
<UserList>{ | |
({users}) => { | |
return <ul> | |
{users.map((user, index) => <li key={index}>{user.id}: {user.name} {user.surname}</li>)} | |
</ul> | |
} | |
} | |
</UserList> | |
</div> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Didn't you forget to add the 'fetchUsers' and 'saveUsers' functions in the UserList props?