Created
April 1, 2021 16:03
-
-
Save estebanmunchjones2019/714eb1e89b94e6243cf02add08f9d028 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this code belongs to some dynamic route page, like /products/:id | |
export async function getStaticPaths() { | |
// some back end code here | |
return { | |
paths: [ | |
{ params: { ... } } | |
], | |
fallback: true or false | |
}; | |
} | |
// Here is an example of the shape of the data that must be returned by this function: | |
return { | |
paths: [ | |
{ params: { id: '1' } }, | |
{ params: { id: '2' } } | |
], | |
fallback: ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment