From the course: Web Components and Modularization: Practical Approaches

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Reusability and when not to care

Reusability and when not to care

From the course: Web Components and Modularization: Practical Approaches

Start my 1-month free trial

Reusability and when not to care

- [Instructor] Reusability is a huge selling point for components. And internally in a project, it can be hugely beneficial. The book carousel component in our project is a perfect example. By building a component or a set of components to be reusable, you have less code, more consistency, and easier maintenance. As I work through this project, once I've created the book carousel component, I can call it in any time in any view to just display a carousel of books and feed it with any data I want. That's the whole point of components. Reusability makes a lot of sense in large projects, especially in the enterprise. However, focusing too much on reusability can become a hindrance to progress. It's important to find the balancing point between making something reusable in many places and making it more complex than it needs to be just to make it reusable. One such example is the BookCards and the single book view.…

Contents