Next.js Discord

Discord Forum

Help with SSG (getStaticProps)

Answered
Vespid wasp posted this in #help-forum
Open in Discord
Vespid waspOP
getting this error trying to use getStatic props and struggling
"getStaticProps" is not supported in app/.

trying to add getStaticProps to fetch data in app/page.tsx, where should it live if not here?

20 Replies

please read the documentation. it is explained in great detail.
@DirtyCajunRice | AppDir please read the documentation. it is explained in great detail.
Vespid waspOP
ty for the help :) can you link the detailed explanation?
The docs say that it needs to be exported from a page...
that is what I'm doing
@Vespid wasp Click to see attachment
That is not app docs.
you are on pages docs.
Vespid waspOP
does apps have SSG?
I can't find it in the docs
@Vespid wasp does apps have SSG?
yep. read the docs.
not just a section. read through all of it
its a totally different configuration.
Vespid waspOP
I see this and then no other explanation?
read through all of the docs
@DirtyCajunRice | AppDir read through **all** of the docs
Vespid waspOP
I can't seem to find the relevant docs 🤦‍♀️ maybe since you have read them you can link me the specifc page...
@Vespid wasp I can't seem to find the relevant docs 🤦‍♀️ maybe since you have read them you can link me the specifc page...
you keep misunderstanding. Docs are meant to be read through. Not spoon fed to you. Dont skip around just looking for the 1 thing you think you need. read all of the docs. every page. shouldnt take more than an hour. You will understand infinitely more and wont waste peoples time every 5 min asking for links because you have read all of it.
Im not saying this to be mean. Im saying this because its true, and you need to.
I got a report here, but I agree with dcr here. For the app router, at the very least read these sections before you start developing anything – these sections are the must-read basic of the app router that must be understood
Vespid waspOP
Answer