Renderless Components

Learn about renderless components and their usage.

Renderless components are components that don’t render any content of their own. Instead, they contain business logic and stateful data, and other components consume them via scoped slots. It’s a useful pattern that can be used to share reusable code. We’ll look at two examples: ToggleProvider and TagsProvider.

The ToggleProvider component

The first component, called ToggleProvider, provides functionality that allows toggling between two different states, on and off.

Get hands-on with 1400+ tech skills courses.