Skip to content

Instantly share code, notes, and snippets.

@whtswrng
Created October 13, 2018 12:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whtswrng/c1e53f4dfb7168076c330536af870d19 to your computer and use it in GitHub Desktop.
Save whtswrng/c1e53f4dfb7168076c330536af870d19 to your computer and use it in GitHub Desktop.
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>
);
}
}
@phelpa
Copy link

phelpa commented Dec 17, 2019

Didn't you forget to add the 'fetchUsers' and 'saveUsers' functions in the UserList props?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment