Created
July 13, 2016 19:46
-
-
Save jamielob/9fd76b30d7e477ade708524388079413 to your computer and use it in GitHub Desktop.
A sample of the ES6 React snippets that I use in Atom
This file contains 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': | |
'Component - Function (React+Meteor)': | |
'prefix': 'component' | |
'body': ''' | |
import React from 'react'; | |
const $1 = () => ( | |
<div> | |
$2 | |
</div> | |
); | |
export default $1; | |
''' | |
'Component - Class (React+Meteor)': | |
'prefix': 'componentClass' | |
'body': ''' | |
import React from 'react'; | |
class $1 extends React.Component { | |
render() { | |
return ( | |
<div> | |
$2 | |
</div> | |
); | |
} | |
} | |
export default $1; | |
''' | |
'Validated Method (Meteor)': | |
'prefix': 'validatedMethod' | |
'body': ''' | |
export const $1 = new ValidatedMethod({ | |
name: '$2.$1', | |
validate: null, | |
run() { | |
$3 | |
}, | |
}); | |
''' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment