ktallafus / vue-compound-components

Two examples on how to write "compound components" in Vue 3. They're more popular in the React world but possible to do in Vue also.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Basic Vue 3 demo about writing components like this:

<MyDropdown v-model="myDropdownValue">
  <MyDropdownOption value="hi"/>
  <MyDropdownOption value="hey"/>
  <MyDropdownOption value="hello"/>
</MyDropdown>

In this repository, there are examples for:

This technique is called compound components - see Kent Dodds's original React article

More Vue examples of compound components

About

Two examples on how to write "compound components" in Vue 3. They're more popular in the React world but possible to do in Vue also.


Languages

Language:Vue 90.7%Language:HTML 5.7%Language:JavaScript 3.5%