79428314

Date: 2025-02-10 21:16:35
Score: 0.5
Natty:
Report link

I was just working on this today and I had the problem where I couldn't use GetServerSideProps on the app/page.tsx file.

So looking into it, I stumbled accross this documentation:

https://nextjs.org/docs/app/building-your-application/data-fetching/fetching

Look at the first example, the key is to insert the "async" into the "export default async function Page() (...)" for it to properly work. It worked very well for me for server side loading and display of data.

Reasons:
  • Blacklisted phrase (1): this document
  • Whitelisted phrase (-1): It worked
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Juan Carlos Corrales