Created
June 14, 2019 03:14
-
-
Save cevr/b951a31ce6affadfa723daddcf954697 to your computer and use it in GitHub Desktop.
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
const connect = (mapState, mapActions) => Component => { | |
const store = useStore(mapState); | |
const actions = useActions(mapActions); | |
return function Wrapped(props) { | |
return <Component {...props} {...store} {...actions} />; | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment