Last active
March 10, 2019 19:28
-
-
Save crshmk/dd5c894db28ce448eeeda973a44bba41 to your computer and use it in GitHub Desktop.
Atom snippets
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
'.source.js': | |
'React Component': | |
'prefix': 'rc' | |
'body': """ | |
import React, { Component } from 'react' | |
export default class ${1:Classname} extends Component { | |
constructor(props) { | |
super(props) | |
} | |
render() { | |
return ( | |
${2:<span>some component</span>} | |
) | |
} | |
} | |
""" | |
'import default': | |
'prefix': 'i' | |
'body': "import ${1:thing} from '${2:location}'" | |
'import': | |
'prefix': 'im' | |
'body': "import { ${1:thing} } from '${2:location}'" | |
'class arrow method': | |
'prefix': 'method' | |
'body': """ | |
${1:methodName} = (${2}) { | |
${3} | |
} | |
""" | |
'arrow function inline': | |
'prefix': 'arrow' | |
'body': '(${1}) => ${2}' | |
'let': | |
'prefix': 'let' | |
'body': 'let ${1:var} = ${2:val}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment