Created
December 3, 2017 15:43
-
-
Save MicroBenz/93cdc700f36f7c996df85b6199c37aba to your computer and use it in GitHub Desktop.
Recompose
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
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