Skip to content

Instantly share code, notes, and snippets.

@SyedTayyabUlMazhar
Created August 27, 2021 06:26
Show Gist options
  • Save SyedTayyabUlMazhar/f5b385187ec0f50e3d7f0378d347fea7 to your computer and use it in GitHub Desktop.
Save SyedTayyabUlMazhar/f5b385187ec0f50e3d7f0378d347fea7 to your computer and use it in GitHub Desktop.
React native code snippets Stored in /Users/tayyabulmazhar/Library/Application Support/Code/User/snippets
{
"undefined": {
"body": [
" const styles = StyleSheet.create({",
" ",
" })"
]
},
"react-native Stylesheet create": {
"prefix": "Scre",
"body": [
" const styles = StyleSheet.create({",
" ",
" })"
],
"description": "Type 'Scre' to generate code snippet for creating a stylesheet and assigning it to a cons"
},
"New React Native File Boilerplate": {
"prefix": "Boilerplate",
"body": [
"import React from 'react';",
"import {StyleSheet, View, Text, Image} from 'react-native';",
"",
"const styles = StyleSheet.create({",
" container: {",
" flex: 1,",
" justifyContent: 'center',",
" alignItems: 'center',",
" },",
"});",
"",
"export default App = () => {",
" return (",
" <View style={styles.container}>",
" <Text>App</Text>",
" </View>",
" );",
"};",
""
],
"description": "Writes down boilerplate code for a new react native component in a new file."
},
"st": {
"prefix": "st",
"body": [
"style={styles.}"
],
"description": ""
},
"Testborder": {
"prefix": "testborder",
"body": [
"borderWidth:1, borderColor:'white',"
],
"description": "A border to check view bounds."
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment