Coding task · Vue.js course · Module 14: Directives & Plugins

Practice: Renderless Toggle

Create a renderless Toggle component that manages toggle state and passes it through a slot.

Task

Implement a Toggle component with ref isOn, a toggle function, and a scoped slot.