Skip to main content

Next.js analyzer

Next.js Rendering Strategy

Audits the chosen rendering strategy (SSG, SSR, ISR, client) for fit with the file role and data dependencies.

patterns nextjs-rendering

Next.js Rendering Strategy

Audits the chosen rendering strategy (SSG, SSR, ISR, client) for fit with the file role and data dependencies.

Next.js supports several rendering modes that trade freshness, scalability, and complexity. Mismatched choices (e.g., static rendering for time-sensitive data, ISR for content that changes every request) silently degrade UX or cache hit rates. This analysis detects when the rendering strategy doesn't fit the page's actual data freshness requirements.

Severity guide

info
An alternative rendering strategy might be more efficient; consider during the next refactor.
warning
Rendering strategy conflicts with the data dependencies or page role.
critical
Rendering strategy will produce stale or incorrect output for users.

Remediation

Match the rendering mode to the data freshness and personalization requirements of the page.

Use static rendering for marketing content; ISR for catalogue pages with periodic updates; dynamic rendering for personalized or real-time data. The fetch cache options drive the choice when using Server Components.

Documentation