Skip to content

Instantly share code, notes, and snippets.

@crshmk
Last active March 10, 2019 19:28
Show Gist options
  • Save crshmk/dd5c894db28ce448eeeda973a44bba41 to your computer and use it in GitHub Desktop.
Save crshmk/dd5c894db28ce448eeeda973a44bba41 to your computer and use it in GitHub Desktop.
Atom snippets
'.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