Next.js Discord

Discord Forum

How can I get data only at build time, similar to getStaticProps, in app router?

Unanswered
Japanese Bobtail posted this in #help-forum
Open in Discord
Original message was deleted.

11 Replies

in app router, GET Routes are cached by default no need to use unstable_cache
@Japanese Bobtail
Japanese Bobtail
Is this behaviour same in dynamic rendering?
Can unstable_cache work in dynamic rendering?
@Japanese Bobtail above docs might help you.
Japanese Bobtail
It has nothing to do with my question. It is for slug segments
@James4u sure, it works
Japanese Bobtail
Thanks!
@Japanese Bobtail for archival purposes please avoid deleting the original question unless strictly necessary, such as when the question contains secrets (that you should have never posted in the first place)