Skip to content

Instantly share code, notes, and snippets.

@MicroBenz
Created December 3, 2017 15:43
Show Gist options
  • Save MicroBenz/93cdc700f36f7c996df85b6199c37aba to your computer and use it in GitHub Desktop.
Save MicroBenz/93cdc700f36f7c996df85b6199c37aba to your computer and use it in GitHub Desktop.
Recompose
import React from 'react';
import { connect } from 'react-redux';
const DumbComponent = (props) => {
const { users } = props;
return (
<ul>
{users.map(user => <li key={user.id}>{user.name}</li>}
</ul>
);
}
export default connect(
state => ({
users: state.user.users
})
)(DumpComponent);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment