Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,17 @@ NextJS and React Snippets with TypeScript support as well!🚀

export default Document;
```

5. `ngsp` (Next.js Get Static Path Javascript)

```jsx
export const getStaticPaths = async () => {
return {
paths:[${1}],
fallback:false
};
};


### TypeScript

Expand Down Expand Up @@ -214,3 +225,14 @@ NextJS and React Snippets with TypeScript support as well!🚀

export default Document;
```

8. `ngspt` (Next.js Get Static Path Typescript)

```tsx
export const getStaticPaths: GetStaticPaths = async () => {
return {
paths:[${1}],
fallback:false
};
}
```
13 changes: 12 additions & 1 deletion snippets/next-javascript.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,18 @@
],
"description": "Next.js Get Static Props Typescript"
},

"ngsp": {
"prefix": "ngsp",
"body": [
"export const getStaticPaths = async () => {",
" return {",
" paths:[${1}],",
" fallback:false",
" }",
"}"
],
"description": "Next.js Get Static Path Javascript"
},
"ncapp": {
"prefix": "ncapp",
"body": [
Expand Down
13 changes: 12 additions & 1 deletion snippets/next-typescript.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,18 @@
],
"description": "Next.js Component Typescript"
},

"ngspt": {
"prefix": "ngspt",
"body": [
"export const getStaticPaths: GetStaticPaths = async () => {",
" return {",
" paths:[${1}],",
" fallback:false",
" }",
"}"
],
"description": "Next.js Get Static Path Typescript"
},
"ncappt": {
"prefix": "ncappt",
"body": [
Expand Down