Skip to content

Instantly share code, notes, and snippets.

@marg51
Created January 22, 2017 17:13
Show Gist options
  • Save marg51/1dfe53108e945fc6e619fa37d47e9f0b to your computer and use it in GitHub Desktop.
Save marg51/1dfe53108e945fc6e619fa37d47e9f0b to your computer and use it in GitHub Desktop.
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