Next.js Discord

Discord Forum

How can I convert a Next.js site into a static site?

Unanswered
Tan posted this in #help-forum
Open in Discord
TanOP
I have a Next.js application with many pages, and every page uses "use client" extensively due to heavy use of hooks. Now, my goal is to convert the site into a static site. Additionally, we are using "next": "^14.2.2", and the application is based on the App Router. Please let me know how I can achieve this

5 Replies

TanOP
here is the build
TanOP
What happens if I remove use client from a page and instead create a separate component to include the use client thing? How would this change affect the behavior of the page?
It won't, and its especially useful if you want to fetch data on server component and pass to a client component
TanOP
My main goal is to make the app very static and lightweight. Now it's too heavy