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

Taught in

References