Created
January 19, 2017 05:34
-
-
Save browniefed/abc2460df79d9dbae5421cde951e1ed1 to your computer and use it in GitHub Desktop.
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
{ | |
"Create Panresponder": { | |
"prefix": "pancreate", | |
"body": [ | |
"PanResponder.create({", | |
" onStartShouldSetPanResponder: (evt, gestureState) => true,", | |
" onMoveShouldSetPanResponder: (evt, gestureState) => true,", | |
" onPanResponderGrant: (e, gestureState) => {", | |
" ", | |
" },", | |
" onPanResponderMove: (e, gestureState) => {", | |
" ", | |
" },", | |
" onPanResponderRelease: (e, gestureState) => {", | |
" ", | |
" },", | |
"})" | |
], | |
"description": "Create a PanResponder" | |
}, | |
"Animated Value": { | |
"prefix": "anv", | |
"body": [ | |
"new Animated.Value($1)" | |
], | |
"description": "New animated value" | |
}, | |
"Animated timing": { | |
"prefix": "ant", | |
"body": [ | |
"Animated.timing($1, {", | |
" toValue: $2,", | |
" duration: $3", | |
"})" | |
], | |
"description": "New animated timing" | |
}, | |
"Animated spring": { | |
"prefix": "ans", | |
"body": [ | |
"Animated.spring($1, {", | |
" toValue: $2,", | |
"})" | |
], | |
"description": "New animated spring" | |
}, | |
"React Native": { | |
"prefix": "rnc", | |
"body": [ | |
"import React, { Component } from \"react\";", | |
"import { View, Text, StyleSheet } from \"react-native\";", | |
"", | |
"class ${id:componentName} extends Component {", | |
" render() {", | |
" return (", | |
" <View />", | |
" );", | |
" }", | |
"}", | |
"", | |
"export default ${id:componentName};" | |
], | |
"description": "Create a react native component" | |
}, | |
"Data Source": { | |
"prefix": "rds", | |
"body": ["const ds = new ListView.DataSource({rowHasChanged: (r1, r2) => r1 !== r2});"], | |
"description": "Listview DataSource" | |
}, | |
/* | |
// Place your snippets for JavaScript here. Each snippet is defined under a snippet name and has a prefix, body and | |
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
// $1, $2 for tab stops, ${id} and ${id:label} and ${1:label} for variables. Variables with the same id are connected. | |
// Example: | |
"Print to console": { | |
"prefix": "log", | |
"body": [ | |
"console.log('$1');", | |
"$2" | |
], | |
"description": "Log output to console" | |
} | |
*/ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment