Created
April 24, 2017 22:40
-
-
Save alialamine/d5a79c84e854ea87f8e7da28c42b592a to your computer and use it in GitHub Desktop.
React Component with Redux connect
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'; | |
class $componentName$ extends Component { | |
render() { | |
return ( | |
$END$ | |
); | |
} | |
} | |
$componentName$.propTypes = { | |
strings: React.PropTypes.object.isRequired, | |
}; | |
const Visible$componentName$ = connect(state => ({ | |
strings: state.locale.strings, // eslint-disable-line react/forbid-prop-types | |
}), dispatch => ({ | |
}))($componentName$); | |
export default Visible$componentName$; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment