EQuimper / VSC-React-Native-React-Redux-Snippets

Snippets for React and React-Native with a bit of Redux for es6/es7 user.
https://marketplace.visualstudio.com/items?itemName=EQuimper.react-native-react-redux
54 stars 31 forks source link

React Redux Container Component snippet? #14

Open phelma opened 6 years ago

phelma commented 6 years ago

Could we add a react-redux container component?

something like

import { connect } from 'react-redux';

const mapStateToProps = state => {  
  return {
  };
};

const mapDispatchToProps = dispatch => {
  return {

  };
};

const $1 = connect(mapStateToProps, mapDispatchToProps)($2);

export default $1;
EQuimper commented 5 years ago

I'm open to pr, and think this is a good one