#How can I build my app without pre-rendering pages? (app router)
9 messages · Page 1 of 1 (latest)
🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord
🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize
✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)
that's not recommended. don't call your own route handlers in server components. https://nextjs-faq.com/fetch-api-in-rsc
@granite plaza thanks for quick answer. I am using external API rather than next api routes, does it make any difference?
oh then it is different. restructure your workflow in such a way that guarantees the api is available during build. you don't simply take your api down whenever you build the app right?
yeah, that's probably the way to go. Thanks!
@granite plaza just out of curiosity what is the reason for failing to build? Is this because next.js is trying to prerender the page for the faster initial load?
yup. the page content is fetched and rendered at build time (static rendering). requests can simply consume the prebuilt content so it is significantly faster.
thanks for the answer. Then if data has changed since the build would they still get the static rendered page? or next js is smart enough to check that data has changed and will server updated one?