Last active
June 30, 2017 21:56
-
-
Save benhorst/435d2739e075487a921b2d82ef17f82c to your computer and use it in GitHub Desktop.
A React boilerplate gist for Atom
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 boilerplate': | |
'prefix': 'rbp' | |
'body': """ | |
import React, { PropTypes } from 'react'; | |
import { connect } from 'react-redux'; | |
import './${1:MyComponent}.less'; | |
const ${1:MyComponent} = ({$3}) => ( | |
<div> | |
$10 | |
</div> | |
); | |
${1:MyComponent}.propTypes = { | |
$5 | |
}; | |
export const Connected${1:MyComponent} = connect( | |
${6:state => ({ | |
\\}),} | |
${7:dispatch => ({ | |
\\})} | |
)(${1:MyComponent}); | |
export default ${1:MyComponent}; | |
""" |
I think it's worth adding more snippets for those!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
imports should be changed from:
to: