Skip to content

Instantly share code, notes, and snippets.

View tkdn's full-sized avatar
🏠
Working From Home.

Satoshi Takeda tkdn

🏠
Working From Home.
View GitHub Profile
@tkdn
tkdn / foo.jsx
Created June 16, 2017 14:28 — forked from tmeasday/foo.jsx
Redux container
// 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