Next.js Interview Questions and Answers
Question: Explain the purpose of the 'getStaticPaths' function in dynamic routes.Answer: 'getStaticPaths' is used in dynamic routes to specify which paths should be pre-rendered at build time. It returns an array of possible values for the dynamic segments in the route. |
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Is it helpful? Yes No
Most helpful rated by users: