Last active
November 6, 2017 17:31
-
-
Save DylanVann/35d8835f89272619c9aba15dc5d7ada8 to your computer and use it in GitHub Desktop.
Redux Container Concise Example
This file contains hidden or 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 { connect } from 'react-redux' | |
| import { createStructuredSelector } from 'reselect' | |
| import MyComponent from './MyComponent' | |
| import { getName, getEmail, onEmailChanged, onNameChanged } from './userReducer' | |
| export default connect( | |
| createStructuredSelector({ | |
| name: getName, | |
| email: getEmail, | |
| }), | |
| { | |
| onEmailChanged, | |
| onNameChanged, | |
| })(MyComponent) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment