Created
          February 18, 2017 18:03 
        
      - 
      
 - 
        
Save cynx/a9dee634cb24fb260440a14ad983dd01 to your computer and use it in GitHub Desktop.  
    React / Redux Templates for WebStorm
  
        
  
    
      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, {Component, PropTypes} from 'react'; | |
| class $NAME extends Component { | |
| constructor(props, context){ | |
| super(props, context); | |
| } | |
| render(){ | |
| return ( | |
| <div> | |
| </div> | |
| ); | |
| } | |
| } | |
| $NAME .propTypes = { | |
| //myProp: PropTypes.object.isRequired | |
| }; | |
| $NAME .defaultProps = { | |
| //myProp: <defaultValue> | |
| }; | |
| export default $NAME; | 
  
    
      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, {PropTypes} from 'react'; | |
| const $NAME = (props) => { | |
| return ( | |
| <div> | |
| </div> | |
| ); | |
| }; | |
| $NAME .propTypes = { | |
| //myProp: PropTypes.object.isRequired | |
| }; | |
| $NAME .defaultProps = { | |
| //myProp: <defaultValue> | |
| }; | |
| export default $NAME; | 
  
    
      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, {Component, PropTypes} from 'react'; | |
| import {connect} from 'react-redux'; | |
| import {bindActionCreators} from 'redux'; | |
| class $NAME extends Component { | |
| constructor(props, context){ | |
| super(props, context); | |
| } | |
| render(){ | |
| return ( | |
| <div> | |
| </div> | |
| ); | |
| } | |
| } | |
| $NAME .propTypes = { | |
| //myProp: PropTypes.object.isRequired | |
| }; | |
| $NAME .defaultProps = { | |
| //myProp: <defaultValue> | |
| }; | |
| function mapStateToProps(state, ownProps){ | |
| return { | |
| state: state | |
| }; | |
| } | |
| function mapDispatchToProps(dispatch){ | |
| return { | |
| actions: bindActionCreators(actions, dispatch) | |
| }; | |
| } | |
| export default connect(mapStateToProps,mapDispatchToProps)($NAME); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment