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
// This is a vastly simplified implementation of what a Redux container would do | |
class MyComponentContainer extends Component { | |
mapStateToProps(state) { | |
// this function is specific to this particular container | |
return state.foo.bar; | |
} | |
render() { | |
// This is how you get the current state from Redux, | |
// and would be identical, no mater what mapStateToProps does |