Skip to content

Instantly share code, notes, and snippets.

@hartzis
Last active October 3, 2016 07:37
Show Gist options
  • Save hartzis/1e6de9c07c0ff7ae7636 to your computer and use it in GitHub Desktop.
Save hartzis/1e6de9c07c0ff7ae7636 to your computer and use it in GitHub Desktop.
import {connect} from 'react-redux';
import View from './Scientist.jsx';
export default connect((state, props)=>{
return {
...state.scientists.get(props.scientist),
};
})(View);
@turboza
Copy link

turboza commented Oct 3, 2016

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

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