Created
September 10, 2024 23:23
-
-
Save huseyincorakli/15bb650d289578e8640024ad8c20d1db to your computer and use it in GitHub Desktop.
React Native Functional Component VS Code Snippet
This file contains hidden or 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
| { | |
| "React Native Functional Component": { | |
| "prefix": "fc", | |
| "body": [ | |
| "import React, { FC, useState } from 'react';", | |
| "import {SafeAreaView, StyleSheet, Text, View } from 'react-native';", | |
| "", | |
| "const ${1:ComponentName}: FC = () => {", | |
| " const [counter, setCounter] = useState<number>(0);", | |
| "", | |
| " return (", | |
| " <SafeAreaView style={styles.container}>", | |
| " <View>", | |
| " <Text>Hello Hüseyin Çoraklı</Text>", | |
| " </View>", | |
| " </SafeAreaView>", | |
| " );", | |
| "};", | |
| "", | |
| "const styles = StyleSheet.create({", | |
| " container: {", | |
| " flex: 1,", | |
| " justifyContent: 'center',", | |
| " alignItems: 'center',", | |
| " },", | |
| "});", | |
| "", | |
| "export default ${1:ComponentName};" | |
| ], | |
| "description": "React Native Functional Component Template" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment