{"repo":"woywro/next-lazy-hydration-on-scroll","free":true,"listed":false,"github":"https://github.com/woywro/next-lazy-hydration-on-scroll","clone":"git clone https://github.com/woywro/next-lazy-hydration-on-scroll.git","description":"Supercharge your Next.js app performance by lazy-loading & hydrating components only when users need them.","language":"TypeScript","stars":187,"topics":["hydration","nextjs","performance-optimization","react"],"license":null,"category":"saas-starters-boilerplates","readme_excerpt":"next-lazy-hydration-on-scroll Hydrate Next.js components when they scroll into view instead of all at once on load. The HTML is still server-rendered, so the page looks and indexes the same. Only the JavaScript is deferred — which cuts hydration work off the critical path and lowers TBT. Pages Router only. On the App Router, use Server Components and streaming instead. Requires React 18+. Still relevant in 2026 Plenty of production apps are still on the Pages Router. It ships in Next.js 16, is not deprecated, and has its own actively maintained docs. Migration is also incremental by design — app/ and pages/ run side by side, page by page — so codebases sit half-migrated for a long time, and the pages/ half never gets Server Components. Those routes hydrate the whole tree on every load. That's what this fixes, without a rewrite. Install Usage With options: Options Option Type Default Description ------------------ ----------------------------------- ------------- ------------------------------------------------------ rootMargin string '0px 250px' How early to hydrate, relative to the viewport wrapperElement keyof React.JSX.IntrinsicElements 'section' Tag used for the wrapper element LoadingComponent ComponentType undefined Shown while the chunk loads Props are forwarded to your component, except wrapperProps , which is spread onto the wrapper: Why not next/dynamic next/dynamic splits the chunk, but the component is still part of the tree, so its JavaScript is needed to hydrate","default_branch":null,"files":null,"tree":[],"storefront":"/r/woywro","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/woywro/next-lazy-hydration-on-scroll/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}