Skip to content

Instantly share code, notes, and snippets.

@belchior
Last active September 20, 2017 02:42
Show Gist options
  • Save belchior/ebf4c1cdc63040f83065980176c772ae to your computer and use it in GitHub Desktop.
Save belchior/ebf4c1cdc63040f83065980176c772ae to your computer and use it in GitHub Desktop.
'.source.js':
'React class':
'prefix': 'rclass'
'body': """
import React, { Component } from 'react';
class ${1:ClassName} extends Component {
constructor(props) {
super(props);
}
render() {
return (${2});
}
}
export default ${1:ClassName};
"""
'Function Definition':
'prefix': 'func'
'body': """
function ${1:functionName}(${2}) {
${3}
}
"""
'Constructor Definition':
'prefix': 'super'
'body': """
constructor(props) {
super(props);
${1}
}
"""
'Arrow Function':
'prefix': '=>'
'body': """
(${1}) => {${2}}
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment