getStatic prop replacement in next 13+
I have a small blog in next js with a few blogposts. The blogposts are accessed through the file system.
GetStaticProps replacement when fetching data locally
I have a small blog in next js with app based routing. For this project I want to prerender all my blogposts when building / making a static export (for SEO purposes).
NextJS – GetStaticProps replacement when fetching data locally
I have a small blog in next js with app based routing. For this project I want to prerender all my blogposts when building / making a static export (for SEO purposes).
how can getstaticprops have access to params or dynamic id when it only runs at build time?
export async function getStaticProps(staticProps) { const params = staticProps.params; return { props: { coffeeStore: coffeeStoresData.find((coffeeStore)=>{return coffeeStore.id === params.id}), }, }; } when we use dynamic route /coffee-store/1 params.id automatically takes value 1. my question is, in next.js, how can getstaticprops have access to params or dynamic id when it only runs at build time and […]