Search code examples
next.jssanity

Next js with sanity


I have a next js website for my client and now I added sanity for content management. It’s working fine but it takes a couple of seconds to fetch data and show it on the screen. Before sanity I was using hardcoded data and of course it was working super fast.

I am using getServerSideProps.

Is there a way to make it work faster?

The website is https://engabeauty.no


Solution

  • I tried to use getStaticProps instead of getServerSideProps like Ejaz suggested and it works like a charm! The website is again super fast.