Questions about using with Next.js directory structure

1 replies
Last updated: Jun 10, 2023
Hi all! I'm using a Next.js app with a directory structure, and I have several questions regarding how to fetch data from . It seems that the documentation has changed because I can't find the getStaticProps and getServerSideProps functions. Has anyone successfully created a project using in Next.js?
Jun 10, 2023, 5:29 PM
getStaticProps and getServerSideProps are in the docs under the Pages Router. The default is now the Apps Router, and you won’t find them there.
Jun 10, 2023, 5:36 PM

Sanity– build remarkable experiences at scale

The Sanity Composable Content Cloud is the headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?

Categorized in