Skip to content

Instantly share code, notes, and snippets.

@FADHILI-Josue
Last active April 30, 2024 12:35
Show Gist options
  • Save FADHILI-Josue/19f3380e249e1b7a4a702384f91215ea to your computer and use it in GitHub Desktop.
Save FADHILI-Josue/19f3380e249e1b7a4a702384f91215ea to your computer and use it in GitHub Desktop.
best dev snippet for creating a react typescript native functional component
"Typescript React native Function Component": {
"prefix": "nfc",
"body": [
"import { FC } from 'react';",
"import { Text, View } from 'react-native';",
"",
"interface ${TM_FILENAME_BASE}Props {",
" $1",
"}",
"",
"const $TM_FILENAME_BASE: FC<${TM_FILENAME_BASE}Props> = ({$2}) => {",
" return <View className='$0'>",
" <Text>$TM_FILENAME_BASE</Text>",
" </View>",
"}",
"",
"export default $TM_FILENAME_BASE"
],
"description": "Typescript React Native Function Component"
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment