leaf component
A component at the bottom of the tree that renders no further custom components, such as a like button.
In more detail
Leaves often hold the interactive bits of a page, such as buttons, toggles and inputs. Keeping interactive state in leaves lets the larger components above them stay simple.
Example
In Next.js making only leaves into Client Components keeps the layouts above them as Server Components that send no JavaScript.Related terms
- component tree — The nested structure of components that make up a page, from the root layout down to the smallest button.
- Client Component — A component whose code is also sent to the browser so it can use state, effects and event handlers.
- 'use client' — The directive that marks a module as the entry point to client code, so it and its imports are sent to the browser.
Taught in
- Client Components: use client & Hydration Models — Next.js 15 & Modern App Router Architecture