arrow_backBACK TO DRILLS
Black Beltserver-componentsPREMIUM
Client Components Are Server-Rendered to HTML Before Client-Side Hydration
A developer marks a component with 'use client' in a Next.js App Router project and assumes it will never execute on the server, since it is explicitly a Client Component. They are surprised to find its JSX output already present in the server's initial HTML response, before any client-side JavaScript has run.
Why does a Client Component's output appear in the server-rendered HTML if 'use client' marks it as client-side?