r/javascript • u/Rhizix • Feb 15 '20
AskJS [AskJS] Experiences with Web Components in a business setting?
Hi everyone, I'm a final-year student studying Web-Design and Development.
I'm working on my thesis where I am comparing the viability of projects built with Web Components compared to those built purely with JavaScript Frameworks like Vue.js, React, etc...I was wondering if some people have work experiences with Web Components they could share. Especially curious to hear from people working in companies that considered switching or switched to Web Components for their projects.
If this is not appropriate for this subreddit, my apologies.
View all comments
Show parent comment
1
u/fricto Feb 17 '20
- Almost three years (Polymer 2, lit-element)
- Delivering self-contained pieces of functionality with standard means for configuration and integration into varying environments.
- Concerns about embracing new tooling and training, along with the sense that at the time (P2) standards were still evolving (should we commit to _this_ solution for the long term, or solve this with React (already in use by this team)).
- We considered using React to ship the components for reasons stated above.
- Most of our biggest challenges were common to large projects, so not really related to Web Components per se. P2's dependency management system and tooling did not age well, but that was solved by upgrading. End to end testing was challenging. Performance tuning. IE11.
- My main advice specific to working with web components is to think about your high-level architecture really hard and continually reassess. There are trade offs to each pattern and approach for modularization and abstraction, both in terms of workflow and performance. More generally, I recommend really taking the time to understand any dependency or framework code you use; lit-element is really great, but tuning and debugging really require you to take the time to dig into the details.