Last active
August 8, 2016 12:59
-
-
Save thekevinscott/6179b6b6966511ba7bc75c9ecff376bb 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 React, { Component } from 'react'; | |
import { connect } from 'react-redux'; | |
function getWrappedComponent( | |
component, | |
[ | |
mapStateToProps, | |
mapDispatchToProps, | |
mergeProps, | |
options, | |
], | |
) { | |
return connect( | |
mapStateToProps, | |
mapDispatchToProps, | |
mergeProps, | |
options, | |
)(component); | |
} | |
const patchedConnect = (...args) => component => { | |
return getWrappedComponent(component, args); | |
}; | |
export default patchedConnect; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment