Skip to content

Instantly share code, notes, and snippets.

@alialamine
Created April 24, 2017 22:40
Show Gist options
  • Save alialamine/d5a79c84e854ea87f8e7da28c42b592a to your computer and use it in GitHub Desktop.
Save alialamine/d5a79c84e854ea87f8e7da28c42b592a to your computer and use it in GitHub Desktop.
React Component with Redux connect
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