Created
December 6, 2016 02:51
-
-
Save chranderson/9990e9e82443f74ed0d3d3e6a7432f91 to your computer and use it in GitHub Desktop.
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
'.source.js': | |
'component': | |
'prefix': 'comp' | |
'body': """ | |
import React, { Component, PropTypes } from 'react'; | |
import { | |
${1:Name}style | |
} from '${1:Name}Styles.js'; | |
export default class ${1:Name} extends Component { | |
static propTypes = { | |
msg: propTypes.string | |
} | |
static defaultProps = { | |
msg: 'this is a msg prop' | |
} | |
render() { | |
// const styles = require('${1:fileName}.scss'); | |
const { | |
msg | |
} = this.props; | |
return ( | |
<div style={ ${1:Name}style }> | |
msg | |
</div> | |
); | |
} | |
} | |
""" | |
'addState': | |
'prefix': 'addState' | |
'body': """ | |
constructor(${1:props}) { | |
super(${1:props}); | |
this.state = { | |
${2:property}: ${3:value} | |
} | |
// this.${4:function} = this.${4:function}.bind(this); | |
} | |
""" | |
'console.log': | |
'prefix': 'log' | |
'body': "console.log('${1:item}: ', ${1:item});" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment