Last active
October 3, 2016 07:37
-
-
Save hartzis/1e6de9c07c0ff7ae7636 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
import {connect} from 'react-redux'; | |
import View from './Scientist.jsx'; | |
export default connect((state, props)=>{ | |
return { | |
...state.scientists.get(props.scientist), | |
}; | |
})(View); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How can you attach
.get
into reducer state properly? As I understand it is not recommended way.ref: http://stackoverflow.com/questions/32352982/how-to-put-methods-onto-the-objects-in-redux-state