-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsnippets.json
45 lines (45 loc) · 1.06 KB
/
snippets.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
"Function Component": {
"prefix": "rnfc",
"body": [
"import React, { Component } from 'react';",
"import {View,StyleSheet} from 'react-native';",
"",
"function ${TM_FILENAME_BASE}(props) {",
" return (",
" <View style={styles.container}>$0</View>",
" );",
"}",
"",
"const styles = StyleSheet.create({",
" container: {}",
"export default ${TM_FILENAME_BASE}"
]
},
"React Native Component": {
"prefix": "imrnc",
"body": [
"import React, { Component } from \"react\";",
"import { \n\tView,\n\tText,\n\tStyleSheet\n} from \"react-native\";",
"\nclass ${TM_FILENAME_BASE} extends Component {",
"\trender() {",
"\t\treturn (",
"\t\t\t<View style={styles.container}>",
"\t\t\t\t<Text>$0</Text>",
"\t\t\t</View>",
"\t\t);",
"\t}",
"}",
"\nconst styles = StyleSheet.create({",
"\tcontainer: {",
"\t\tflex: 1,",
"\t\talignItems: 'center',",
"\t\tjustifyContent: 'center'",
"\t}",
"});",
"",
"export default ${TM_FILENAME_BASE}"
],
"description": "React Component"
}
}