Created
February 13, 2018 20:32
-
-
Save belchior/25530c8f7537f05403d1a84a3efef9c6 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 class': | |
'prefix': 'rclass' | |
'body': """ | |
import React, { Component } from 'react'; | |
class ${1:ClassName} extends Component { | |
constructor(props) { | |
super(props); | |
} | |
render() { | |
return (${2}); | |
} | |
} | |
export default ${1:ClassName}; | |
""" | |
'Function Definition': | |
'prefix': 'func' | |
'body': """ | |
function ${1:functionName}(${2}) { | |
${3} | |
} | |
""" | |
'Constructor Definition': | |
'prefix': 'super' | |
'body': """ | |
constructor(props) { | |
super(props); | |
${1} | |
} | |
""" | |
'Arrow Function': | |
'prefix': '=>' | |
'body': """ | |
(${1}) => {${2}} | |
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment