Last active
April 30, 2024 12:35
-
-
Save FADHILI-Josue/19f3380e249e1b7a4a702384f91215ea to your computer and use it in GitHub Desktop.
best dev snippet for creating a react typescript native functional component
This file contains 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
"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