βœ… Incremental Site Regeneration in next.js

πŸ‘‰ if static site generation sort pried of time regeneration so its call ISR.

πŸ‘‰ it only existed when use static site generation present.

πŸ‘‰ regeneration trigger call revalidate variable second me time provide

πŸ‘‰ revalidate add two different place one is Page Level and second is fetch level ;

1. export const revalidate = 5
2. const await fetch("_",{next:{revalidate:5}})

βœ… Force Static to Dynamic Page

πŸ‘‰ Dynamic page build on req time not the build time

πŸ‘‰ static page dynamic generation using export dynamic variable

export const dynamic = "force-dynamic"

πŸ‘‰ also support different value like: force-dynamic,error,auto,force-static and by default set value auto

πŸ‘‰ if page inside use searchParams,Cookies,Headers,connection,defaultMode,fetch etc so automatic make dynamic page

πŸ‘‰ forcefully dynamic page make it static so params,searchParams,Cookies etc show empty value

πŸ‘‰ if default value error forcefully dynamic page make it static then build time error cause for this is dynamic page.

βœ… Streaming in next.js

πŸ‘‰ streaming use for long page or components stream in chunk so page load faster

πŸ‘‰ stream enable wrap page or components in Suspense

<Suspense fallback={<div>Loading...</div>}>
<div>long Content or dynamic content</div>
</Suspense>

πŸ‘‰ Suspense give fallback content show when data not yet. if data coming isCompleted then fallback content remove and actual content show

βœ… Server Components and Client Components

πŸ‘‰ server comp. only run on server

πŸ‘‰ client comp. run on both side server and client

πŸ‘‰ client comp. when need interactivity on page

πŸ‘‰ make client comp. so add top on page "use client" keyword

πŸ‘‰ react hook etc use on client comp. support

πŸ‘‰ Any child comp. inside all component automatic become child component

count is: 5

βœ… Hydration Error on Next.js

πŸ‘‰ if render html and server html are not match so throw hydration error

πŸ‘‰ if any link add on page so hydration error possible

πŸ‘‰ Error show only on Development mode not in production

πŸ‘‰ its user experience not good