Knowledgebase

Understanding Next.js Print

  • frontenddevelopment, frontend, webhosting, performance, guide, howto, solution, zillionkinghost
  • 0

The most widely used React framework.

WHAT IT ADDS TO REACT

Routing based on file structure Server rendering, static generation and incremental regeneration Data loading conventions An API layer Image and font optimisation Build configuration

WHY IT IS WIDELY USED

It removes decisions every React application otherwise makes individually.

WHAT THE ROUTING MODELS ARE

An older approach based on a pages directory A newer approach based on an application directory, with server components

WHAT SERVER COMPONENTS CHANGE

Components rendering on the server only, shipping no JavaScript for themselves.

WHY THAT MATTERS

It reduces what the browser downloads and executes substantially.

WHAT TO BE CAREFUL WITH

Mixing the two models Assuming a component runs where you expect Using browser-only features in server components

WHAT TO ESTABLISH

Which model a project uses, and stay within it.

WHAT TO CHECK BEFORE ADOPTING

What your hosting supports.

WHY

Some features require a specific runtime environment, which shared hosting does not provide.

WHAT TO PRODUCE FOR SHARED HOSTING

A static export, where the application allows it.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot