This is an excerpt of my course, Reusable Components, which will be released on November 3!
In Module 4 of Reusable Components we cover the third level of reusability, Adaptability.
This lesson covers a few ideas around when we would want to use slots, moving our component from Configuration to Adaptability, including:
- The inherent limitations of props
- Why slots are better than props
- When it makes sense to actually avoid reusability in your components
Check out the course page for more details on what's included in the course!
Most Popular
The 6 Levels of Reusability
June 2020
We all want to write less code, but get more done. To make this happen, we build our components so they can be reused more than just once.
The Underdog Framework
January 2020
If React is so much more popular than Vue, wouldn't it be better to just stick with that? There are 3 specific things here I'd like to cover: 1. Growth of the framework itself (innovation) 2. Career opportunities 3. Ease of learning/getting better
The Most Important Feature in Vue
November 2019
I've said it before and I'll say it again: Computed properties are the most important feature in Vue. Sure, scoped slots let you create some nice abstractions and watchers are useful too. But I don't think anything comes close to how valuable computed props are.