loading...
Cover image for web components are the best long-term option?

web components are the best long-term option?

angabar profile image Enric Cebolla Cerdà ・1 min read

Hello

In one of our projects we are preparing a React component library with storybook for our project in React.

But seeing as the tools change in the front-end world, I don't know if it will be a better bet to prepare the component library with web-components.

web-components can work with React, Angular and Vue, do you think it is a better option for the future of my project or future projects?

Thank you for your time.

Discussion

markdown guide
 

Yes 😉.

To my point of view, when it comes to components and design systems, nowadays, betting on Web Components is the way to be future proof, both in terms of reusability, flexibility and also specially in terms of possible costs of migration.

There is always an uncertainty about how will a product evolve, at least with such components you already now that you will be able to handle more scenarios even if they only help the project in terms of transition.

For example one of my current client has a design system developed with strictly Angular components. Moreover than being tight with the technology, major migration of the framework costs the company money as the dependencies can't be solved easily and quickly as it would be with agnostic components (note that I am not preaching against Angular, I like it, just an example. Moreover you can also create WC with Angular too).

Of course you might never drop React for your app, that's more than possible, I'm agree. But still it's a possibility and moreover, you don't know neither if your design systems at some points will be useful for other apps of your company, which might use other frameworks. Web Components would allow this.

So of course this is a quick opiniated short answer. Some might not be agree with me and I'm totally cool with it, probably even agree on some points too but that being said, Web Components are awesome 🚀

That's the way a Mandalorian would say.

 

I totally agree, thanks for the reply! :D

 

Longevity is one of the biggest reasons to adopt Web Components. Custom elements v1 will be in browsers for several years to come.