Skip to content

Instantly share code, notes, and snippets.

@huseyincorakli
Created September 10, 2024 23:23
Show Gist options
  • Select an option

  • Save huseyincorakli/15bb650d289578e8640024ad8c20d1db to your computer and use it in GitHub Desktop.

Select an option

Save huseyincorakli/15bb650d289578e8640024ad8c20d1db to your computer and use it in GitHub Desktop.
React Native Functional Component VS Code Snippet
{
"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