Questions about using Sanity.io with Next.js directory structure
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 Sanity.io . It seems that the documentation has changed because I can't find the getStaticProps and getServerSideProps functions. Has anyone successfully created a project using Sanity.io 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.