Skip to content

Instantly share code, notes, and snippets.

@AlexVipond
Last active August 24, 2022 03:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlexVipond/f48a9a077b83117e0cf09ea097e1487b to your computer and use it in GitHub Desktop.
Save AlexVipond/f48a9a077b83117e0cf09ea097e1487b to your computer and use it in GitHub Desktop.
Levels of Reusability cheatsheet

Levels of Reusability cheatsheet

In the "Reusable Components" course, Michael Thiessen teaches six levels of reusability for Vue components.

I started to understand these levels more deeply once I noticed that each level relies on a specific Vue feature to unlock new possibilities.

Here's a cheatsheet:

Level of Reusability Description Vue feature
Templating Reusing code by wrapping it up inside of a component Template syntax
Configuration Using configuration props to allow for varying behaviour Props and emit
Adaptability Allowing components to become future-proof Slots
Inversion Letting other components control the process Scoped slots
Extension Using reusability throughout our component Named slots, including named scoped slots
Nesting Creating powerful hierarchies of components All of the above, plus provide & inject
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment