News for hackers. Stuff that matters.
Re:Web Components could replace frontend frameworks? by threeaccents on Thursday April 11, 2019 @09:51PM (#19641215)
Web components are awesome I've been using them in production using StencilJS for a pretty large app for about a year now. Even though browser support is widely available there are still a few gotchas with web components, specially Shadow DOM. Not all community tools have caught up as well. For example you can't use Stripe v3 with Shadow DOM. Most analytics tools also cannot access the Shadow DOM. We had to remove Shadow DOM from all our components that were using it. In my opinion Web Components are definitely the future but there's still some catching up to do before we can claim it can replace frameworks.
Re:Web Components could replace frontend frameworks? by westbrookjo on Thursday April 11, 2019 @11:32PM (#19641710)
You might be interested in https://github.com/bennypowers/stripe-elements Stripe v3 with Shadow DOM.
Re:Web Components could replace frontend frameworks? by threeaccents on Friday April 12, 2019 @06:00PM (#19649427)
Thanks I had actually seen this while looking into a workaround for us. However I thought that LitHTML elements only worked with other LitHTML elements since you need the correct bundler for it. StencilJS projects don't have any bundling system.
Re:Web Components could replace frontend frameworks? by westbrookjo on Friday April 12, 2019 @10:33PM (#19650747)
LitHTML and LitElement don't need a specific bundler, they work with whatever tools (or not) you'd like. You might want to get them another look!