Skip to content

Instantly share code, notes, and snippets.

@nuqz
Created May 28, 2017 20:28
Show Gist options
  • Save nuqz/99a0e59d0a579fcfb783d7a57f5b394f to your computer and use it in GitHub Desktop.
Save nuqz/99a0e59d0a579fcfb783d7a57f5b394f to your computer and use it in GitHub Desktop.
React component Atom snippet
'.source.js.jsx':
'Component':
'prefix': 'rcom'
'body': '''
import React, { Component } from 'react'
import PropTypes from 'prop-types'
${1:import ${2:...} from '${3:package}'
}class ${4:MyComponent} extends Component {
${5:static propTypes = {
${6:...}
\\}
}${7:constructor(props) {
super(props)
${8:...}
\\}
}render() {
return (
${9:...}
)
}
}
export default ${4:MyComponent}
'''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment