Skip to content

Instantly share code, notes, and snippets.

@yurikilian
Last active October 28, 2017 13:37
Show Gist options
  • Save yurikilian/92079ac78b00355b175651ae127f87b0 to your computer and use it in GitHub Desktop.
Save yurikilian/92079ac78b00355b175651ae127f87b0 to your computer and use it in GitHub Desktop.
Create React Native Class With Export Default
"React Native Component Class": {
"prefix": "rncc",
"body": [
"import React, { Component } from 'react';",
"import { View, StyleSheet } from 'react-native';\n\n",
"export default class ${1:ClassName} extends Component {",
"\tconstructor(props) {\n\t\tsuper(props);\n\t}",
"\trender() {",
"\t\treturn (",
"\t\t\t<View style={styles.container}>$0</View>",
"\t\t)",
"\t}",
"}",
"\n",
"const styles = StyleSheet.create({",
"\tcontainer: {",
"\t\tflex:1,",
"\t\tjustifyContent:'center'",
"\t}",
"});"
],
"description": "Inserts a React-style comment"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment