Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. "Import nextjs link": {
  2. "scope": "javascript, typescript",
  3. "prefix": "inl",
  4. "body": [
  5. "import Link from 'next/link';",
  6. ],
  7. "description": "import next link"
  8. },
  9. "Import nextjs router": {
  10. "scope": "javascript, typescript",
  11. "prefix": "inr",
  12. "body": [
  13. "import Router from 'next/router';",
  14. ],
  15. "description": "import next router"
  16. },
  17. "Use Next link standard": {
  18. "scope": "javascript, typescript",
  19. "prefix": "nxl",
  20. "body": [
  21. "<Link href='$1'>",
  22. "<a>$0</a>",
  23. "</Link>",
  24. ],
  25. "description": "use next link"
  26. },
  27. "Use Next link with query": {
  28. "scope": "javascript, typescript",
  29. "prefix": "nxlq",
  30. "body": [
  31. "<Link",
  32. "href={{",
  33. "pathname: '$1'",
  34. "query: { $2 }",
  35. "}}",
  36. ">",
  37. "<a>$0</a>",
  38. "</Link>",
  39. ],
  40. "description": "use next link w pathname and query"
  41. },
  42. "Use Next router": {
  43. "scope": "javascript, typescript",
  44. "prefix": "nxr",
  45. "body": [
  46. "Router.push({",
  47. "pathname: '$1',",
  48. "query: { $0 },",
  49. "})"
  50. ],
  51. "description": "use next router"
  52. },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement