Created
July 8, 2015 03:31
-
-
Save tmbtech/3fc73a9210cfa41a3bd2 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
//saving from reactiflux channel, credit: pgwsmith. | |
export default function componentClassConnectedToStore(Component, store, storeIdentifier) { | |
const ComponentWrapper = React.createClass({ | |
mixins: [Reflux.connect(store, storeIdentifier)], | |
render() { | |
return ( | |
<Component {...this.props} {...this.state} /> | |
); | |
} | |
}); | |
return ComponentWrapper; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment