Created
January 22, 2017 17:13
-
-
Save marg51/1dfe53108e945fc6e619fa37d47e9f0b 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 TodoList from "./todo-list" | |
function connect(mapStateToProps, mapDispatchToProps) { | |
return (Target) => { | |
class Connected extends Component { | |
render() { | |
// we pass the props down | |
return (<Target {...this.props} />) | |
} | |
} | |
return Connected | |
} | |
} | |
export default connect( | |
null, // mapStateToProps, unused yet | |
null // mapDispatchToProps, unused yet | |
)(TodoList) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment