tezvyn:

Pass server state to client in Nuxt and name the composable

Source: nuxt.comintermediate

This tests Nuxt SSR state hydration. A strong answer names useState, explains server values serialize to JSON for client hydration, and warns against refs defined outside setup.

This tests Nuxt SSR state serialization and hydration mechanics. A strong answer identifies useState as the SSR-friendly ref that persists server data through client hydration. It notes values are serialized to JSON, which forbids classes, functions, or symbols; requires a unique string key for cross-component sharing; and warns that plain refs defined outside setup leak across requests and cause memory issues. Red flag: naming Pinia without explaining hydration, or suggesting global refs without understanding server request isolation.

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.

Pass server state to client in Nuxt and name the composable · Tezvyn