Guest User

Untitled

a guest
Jan 20th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. {
  2. "TypeScript React Component Full": {
  3. "prefix": "tsrcf",
  4. "body": [
  5. "import * as React from \"react\";",
  6. "",
  7. "interface IProps {",
  8. "",
  9. "}",
  10. "",
  11. "interface IState {",
  12. "",
  13. "}",
  14. "",
  15. "class ${TM_FILENAME_BASE} extends React.Component<IProps, IState> {",
  16. "\tconstructor(props: IProps) {",
  17. "\t\tsuper(props);",
  18. "\t};",
  19. "",
  20. "\trender() {",
  21. "\t\treturn(",
  22. "\t\t\t<div>",
  23. "\t\t\t\t<h2>${TM_FILENAME_BASE}</h2>",
  24. "\t\t\t</div>",
  25. "\t\t);",
  26. "\t};",
  27. "}",
  28. "",
  29. "export default ${TM_FILENAME_BASE};"
  30. ]
  31. },
  32. "TypeScript React Component Simple": {
  33. "prefix": "tsrcs",
  34. "body": [
  35. "import * as React from \"react\";",
  36. "",
  37. "interface IProps {",
  38. "",
  39. "}",
  40. "",
  41. "class ${TM_FILENAME_BASE} extends React.Component<IProps> {",
  42. "\trender() {",
  43. "\t\treturn(",
  44. "\t\t\t<div>",
  45. "\t\t\t\t<h2>${TM_FILENAME_BASE}</h2>",
  46. "\t\t\t</div>",
  47. "\t\t);",
  48. "\t};",
  49. "}",
  50. "",
  51. "export default ${TM_FILENAME_BASE};"
  52. ]
  53. },
  54. }
Add Comment
Please, Sign In to add comment