Advertisement
Guest User

Untitled

a guest
May 22nd, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. "React Native Redux Component": {
  2. "scope": "javascript,typescript",
  3. "prefix": "rncc",
  4. "body": [
  5. "import { View, Text, StyleSheet } from 'react-native';",
  6. "import React, { Component } from 'react';",
  7. "import { connect } from 'react-redux';",
  8. "",
  9. "class ${1:string} extends Component {",
  10. " render() {",
  11. " return (",
  12. " <View style={styles.container}>",
  13. " ${1:string}",
  14. " </View>",
  15. " );",
  16. " }",
  17. "}",
  18. "",
  19. "const styles = StyleSheet.create({",
  20. " container: {",
  21. " flex: 1",
  22. " }",
  23. "});",
  24. "",
  25. "const mapStateToProps = state => ({});",
  26. "",
  27. "const mapDispatchToProps = dispatch => ({});",
  28. "",
  29. "export default connect(",
  30. " mapStateToProps,",
  31. " mapDispatchToProps",
  32. ")(${1:string});",
  33. ],
  34. "description": "React native redux component"
  35. },
  36. "Import Export": {
  37. "scope": "javascript,typescript",
  38. "prefix": "imp",
  39. "body": [
  40. "import ${1:string} from './${1:string}';",
  41. "",
  42. "export default ${1:string};",
  43. ],
  44. "description": "Import Export"
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement