You may want to disable server-side rendering or static site generation for some of your NextJS pages or components. For example, this is useful when using modules that only work in the browser. Or if your component needs to access some properties only available in the browser, like the window object or localStorage. Another reason you may want to disable server-side rendering for a component or an entire page is to lower your bundle size, as not all users will require this functionality.

In this article, we will go over two different ways to opt-out of serer side rendering in NextJS.

#javascript #frontend #nextjs #react

How to Disable SSR for a Next.js Page
40.20 GEEK