Last active
July 5, 2018 14:07
-
-
Save maxmarinich/66541c171dca915f0975729f7f87f004 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
import React from 'react' | |
import { connect } from 'react-redux' | |
export default (Component) => { | |
class WithConfig extends React.Component { | |
render() { | |
return <Component { ...this.props } /> | |
} | |
} | |
const mapStateToProps = (state) => ({ state }) | |
return connect(mapStateToProps)(WithConfig) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment