Skip to content

Instantly share code, notes, and snippets.

@belchior
Created February 13, 2018 20:32
Show Gist options
  • Save belchior/25530c8f7537f05403d1a84a3efef9c6 to your computer and use it in GitHub Desktop.
Save belchior/25530c8f7537f05403d1a84a3efef9c6 to your computer and use it in GitHub Desktop.
atom snippets
'.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