There is no “perfect” way to write components and component libraries.
While we do follow a clear path in this course, I also want to let you know about the alternatives. That way, when you finish the course, you’ll be able to make the best decision for the individual problems you face, even if it means choosing different technologies than the ones you’ve used in this course.
So for the next few lessons, we’ll be covering some of the different ways you can write a component.
HTML - the humble language powering virtually every website in existence.
Utility classes - handy classes written using CSS. you can apply these to elements to drastically alter their look and feel.
Templating languages - a kind of souped-up version of HTML that goes through a process called compilation. Once compiled, the code is plain ol’, browser-friendly HTML.
Web Components - an increasingly popular tool that allows developers to write their own browser-friendly custom elements. They’re also easy to distribute and share among projects.
Framework-specific components. A great option if you want to build components for a particular ecosystem. There are hundreds of component libraries out there for React, Vue, or any other number of web frameworks.