tezvyn:

Universal Rendering: Server-First, Client-Interactive

Source: nuxt.combeginner

Universal Rendering sends a pre-built HTML page from the server for a fast load, then adds interactivity on the client. It's the default in frameworks like Nuxt for better SEO, but the footgun is writing code that crashes on the server by assuming a browser.

Universal Rendering sends a fully-built HTML page from the server for a fast load, then 'hydrates' it on the client to add interactivity. It’s the default in meta-frameworks like Nuxt, blending fast perceived performance and strong SEO with the feel of an SPA. The main footgun is writing code that assumes a browser environment; using APIs like `window` will crash the server-side render process before the page is even sent.

Read the original → nuxt.com

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.

Universal Rendering: Server-First, Client-Interactive · Tezvyn