init
This commit is contained in:
8
snippets/rjsx-mode/React-Native/imrn
Normal file
8
snippets/rjsx-mode/React-Native/imrn
Normal file
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# uuid: 1eff0de2-eeb3-457f-b935-7a733a03d378
|
||||
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
|
||||
# name: reactNativeImport
|
||||
# key: imrn
|
||||
# --
|
||||
|
||||
import { ${1:moduleName} } from 'react-native'
|
||||
19
snippets/rjsx-mode/React-Native/rnc
Normal file
19
snippets/rjsx-mode/React-Native/rnc
Normal file
@@ -0,0 +1,19 @@
|
||||
# -*- mode: snippet -*-
|
||||
# uuid: c4aa3b3e-82af-434b-acc5-b08bf018e0aa
|
||||
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
|
||||
# name: reactNativeComponent
|
||||
# key: rnc
|
||||
# --
|
||||
|
||||
import React, { Component } from 'react'
|
||||
import { Text, View } from 'react-native'
|
||||
|
||||
export default class ${1:`(yas-jsx-get-class-name-by-file-name)`} extends Component {
|
||||
render() {
|
||||
return (
|
||||
<View>
|
||||
<Text>${2:textInComponent}</Text>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
}
|
||||
21
snippets/rjsx-mode/React-Native/rnce
Normal file
21
snippets/rjsx-mode/React-Native/rnce
Normal file
@@ -0,0 +1,21 @@
|
||||
# -*- mode: snippet -*-
|
||||
# uuid: 27262af6-b8a7-4165-bbfb-815f62eb3d4f
|
||||
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
|
||||
# name: reactNativeComponentExport
|
||||
# key: rnce
|
||||
# --
|
||||
|
||||
import React, { Component } from 'react'
|
||||
import { Text, View } from 'react-native'
|
||||
|
||||
export class ${1:`(yas-jsx-get-class-name-by-file-name)`} extends Component {
|
||||
render() {
|
||||
return (
|
||||
<View>
|
||||
<Text>${2:textInComponent}</Text>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default $1
|
||||
21
snippets/rjsx-mode/React-Native/rncs
Normal file
21
snippets/rjsx-mode/React-Native/rncs
Normal file
@@ -0,0 +1,21 @@
|
||||
# -*- mode: snippet -*-
|
||||
# uuid: 6a9c7016-01b0-4c5c-84d6-28a688d81a4b
|
||||
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
|
||||
# name: reactNativeComponentWithStyles
|
||||
# key: rncs
|
||||
# --
|
||||
|
||||
import React, { Component } from 'react'
|
||||
import { Text, StyleSheet, View } from 'react-native'
|
||||
|
||||
export default class ${1:`(yas-jsx-get-class-name-by-file-name)`} extends Component {
|
||||
render() {
|
||||
return (
|
||||
<View>
|
||||
<Text>${2:textInComponent}</Text>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({})
|
||||
19
snippets/rjsx-mode/React-Native/rnpc
Normal file
19
snippets/rjsx-mode/React-Native/rnpc
Normal file
@@ -0,0 +1,19 @@
|
||||
# -*- mode: snippet -*-
|
||||
# uuid: d30232be-9660-4736-9fdc-4e50559db3d1
|
||||
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
|
||||
# name: reactNativePureComponent
|
||||
# key: rnpc
|
||||
# --
|
||||
|
||||
import React, { PureComponent } from 'react'
|
||||
import { Text, View } from 'react-native'
|
||||
|
||||
export default class ${1:`(yas-jsx-get-class-name-by-file-name)`} extends PureComponent {
|
||||
render() {
|
||||
return (
|
||||
<View>
|
||||
<Text>${2:textInComponent}</Text>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
}
|
||||
21
snippets/rjsx-mode/React-Native/rnpce
Normal file
21
snippets/rjsx-mode/React-Native/rnpce
Normal file
@@ -0,0 +1,21 @@
|
||||
# -*- mode: snippet -*-
|
||||
# uuid: b36666f2-3ac6-4ee7-9f17-b32d82705306
|
||||
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
|
||||
# name: reactNativePureComponentExport
|
||||
# key: rnpce
|
||||
# --
|
||||
|
||||
import React, { PureComponent } from 'react'
|
||||
import { Text, View } from 'react-native'
|
||||
|
||||
export class ${1:`(yas-jsx-get-class-name-by-file-name)`} extends PureComponent {
|
||||
render() {
|
||||
return (
|
||||
<View>
|
||||
<Text>${2:textInComponent}</Text>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default $1
|
||||
10
snippets/rjsx-mode/React-Native/rnstyle
Normal file
10
snippets/rjsx-mode/React-Native/rnstyle
Normal file
@@ -0,0 +1,10 @@
|
||||
# -*- mode: snippet -*-
|
||||
# uuid: 0b1a0e2b-5577-4a15-bbbb-d573376c8587
|
||||
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
|
||||
# name: reactNativeStyles
|
||||
# key: rnstyle
|
||||
# --
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
${1:style}
|
||||
})
|
||||
Reference in New Issue
Block a user