Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.00 KB | None | 0 0
  1. {
  2. "Insert a function": {
  3. "prefix": "f",
  4. "body": [
  5. "function $1($2) {\n $0\n}\n"
  6. ],
  7. "description": "Insert a function"
  8. },
  9. "const arrow": {
  10. "prefix": "c>",
  11. "body": [
  12. "const $1 = ($2) => {\n $3\n}\n"
  13. ],
  14. "description": "named arrow function"
  15. },
  16. "const arrow implicit return": {
  17. "prefix": "c>(",
  18. "body": [
  19. "const $1 = ($2) => (\n $3\n)\n"
  20. ],
  21. "description": "named arrow function"
  22. },
  23. "arrow with body (type name first)": {
  24. "prefix": "=>",
  25. "body": [
  26. "= ($1) => {",
  27. " $0",
  28. "}"
  29. ],
  30. "description": "arrow function with body"
  31. },
  32. "import named": {
  33. "prefix": "i",
  34. "body": [
  35. "import { $1 } from '$2';"
  36. ],
  37. "description": "import named item(s)"
  38. },
  39. "import default": {
  40. "prefix": "I",
  41. "body": [
  42. "import $1 from '$2';"
  43. ],
  44. "description": "import default"
  45. },
  46. "import default from file": {
  47. "prefix": "Id",
  48. "body": [
  49. "import $1 from './$1';"
  50. ],
  51. "description": "import default from file with same name"
  52. },
  53. "import React": {
  54. "prefix": "ir",
  55. "body": [
  56. "import React from 'react';"
  57. ],
  58. "description": "import React"
  59. },
  60. "import connect": {
  61. "prefix": "ic",
  62. "body": [
  63. "import { connect } from 'react-redux';"
  64. ],
  65. "description": "import connect"
  66. },
  67. "import PropTypes": {
  68. "prefix": "ipt",
  69. "body": [
  70. "import PropTypes from 'prop-types';"
  71. ],
  72. "description": "import PropTypes"
  73. },
  74. "import ReactDOM": {
  75. "prefix": "ird",
  76. "body": [
  77. "import ReactDOM from 'react-dom';"
  78. ],
  79. "description": "import ReactDOM"
  80. },
  81. "import index.css": {
  82. "prefix": "ics",
  83. "body": [
  84. "import './index.css';"
  85. ],
  86. "description": "import index.css"
  87. },
  88. "export default": {
  89. "prefix": "E",
  90. "body": [
  91. "export default $1"
  92. ],
  93. "description": "export default"
  94. },
  95. "export redux action": {
  96. "prefix": "ea",
  97. "body": [
  98. "export const $1 = '$1';"
  99. ],
  100. "description": "export redux action"
  101. },
  102. "export const": {
  103. "prefix": "ec",
  104. "body": [
  105. "export const $1"
  106. ],
  107. "description": "export const"
  108. },
  109. "className": {
  110. "prefix": "cn",
  111. "body": [
  112. "className='$1'"
  113. ],
  114. "description": "className"
  115. },
  116. "dispatch action object": {
  117. "prefix": "dao",
  118. "body": [
  119. "dispatch({ type: $1 });"
  120. ],
  121. "description": "dispatch action object"
  122. },
  123. "begin success error": {
  124. "prefix": "bse",
  125. "body": [
  126. "export const $1_BEGIN = '$1_BEGIN';",
  127. "export const $1_SUCCESS = '$1_SUCCESS';",
  128. "export const $1_ERROR = '$1_ERROR';"
  129. ],
  130. "description": "begin success error"
  131. },
  132. "console.log": {
  133. "prefix": "cl",
  134. "body": [
  135. "console.log($1)"
  136. ],
  137. "description": "console.log"
  138. },
  139. "PropTypes.object": {
  140. "prefix": "pto",
  141. "body": [
  142. "PropTypes.object"
  143. ],
  144. "description": "PropTypes.object"
  145. },
  146. "PropTypes.string": {
  147. "prefix": "pts",
  148. "body": [
  149. "PropTypes.string"
  150. ],
  151. "description": "PropTypes.string"
  152. },
  153. "PropTypes.array": {
  154. "prefix": "pta",
  155. "body": [
  156. "PropTypes.array"
  157. ],
  158. "description": "PropTypes.array"
  159. },
  160. "PropTypes.func": {
  161. "prefix": "ptf",
  162. "body": [
  163. "PropTypes.func"
  164. ],
  165. "description": "PropTypes.func"
  166. },
  167. "PropTypes.number": {
  168. "prefix": "ptn",
  169. "body": [
  170. "PropTypes.number"
  171. ],
  172. "description": "PropTypes.number"
  173. },
  174. "React class component file": {
  175. "prefix": "rcc",
  176. "body": [
  177. "import React from 'react';",
  178. "",
  179. "class $1 extends React.Component {",
  180. " render() {",
  181. " return (",
  182. " $0",
  183. " );",
  184. " }",
  185. "}",
  186. "",
  187. "export default $1;"
  188. ],
  189. "description": "React class component"
  190. },
  191. "ReactDOM.render": {
  192. "prefix": "rdr",
  193. "body": [
  194. "ReactDOM.render($1, $2)"
  195. ],
  196. "description": "ReactDOM.render"
  197. },
  198. "document.querySelector": {
  199. "prefix": "dq",
  200. "body": [
  201. "document.querySelector($1)"
  202. ],
  203. "description": "querySelector"
  204. },
  205. "React function component": {
  206. "prefix": "rfc",
  207. "body": [
  208. "import React from 'react';",
  209. "",
  210. "const $1 = () => (",
  211. " <div />",
  212. ");",
  213. "",
  214. "export default $1;"
  215. ]
  216. },
  217. "React class boilerplate": {
  218. "prefix": "rbc",
  219. "body": [
  220. "import React from 'react';",
  221. "import ReactDOM from 'react-dom';",
  222. "",
  223. "class $1 extends React.Component {",
  224. " render() {",
  225. " return (",
  226. " $0",
  227. " );",
  228. " }",
  229. "}",
  230. "",
  231. "ReactDOM.render(",
  232. " <$1 />,",
  233. " document.querySelector('#root')",
  234. ");"
  235. ]
  236. },
  237. "React boilerplate": {
  238. "prefix": "rb",
  239. "body": [
  240. "import React from 'react';",
  241. "import ReactDOM from 'react-dom';",
  242. "",
  243. "const $1 = () => (",
  244. " <div />",
  245. ");",
  246. "",
  247. "ReactDOM.render(",
  248. " <$1 />,",
  249. " document.querySelector('#root')",
  250. ");"
  251. ]
  252. }
  253. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement