3 ms·
What extra requests? Are there any requests you get with Web Components that you don't with React, Angular, jQuery or plain JavaScript? Web Components are just
by spankalee 11y ago
What extra requests? Are there any requests you get with Web Components that you don't with React, Angular, jQuery or plain JavaScript?
Web Components are just a set of APIs and capabilities in the browser. They don't imply anything about the number and type of files that are used to create your app.
- everlost 11y agoI was comparing importing Web Components using HTML imports vs. static inlining the web component code within initial markup sent to browser. Putting it another way - whats the advantage of HTML imports over server side imports? Server side imports may increase the initial payload, but that will still be quicker compared to extra fetch requests for the web component. @nostrademons is right that http2 will level the playing field for this battle... so definitely keeping an eye out for it!
- spankalee 11y agoWeb component APIs and HTML imports are mostly orthogonal, except that HTML is a nice way to package HTML, CSS and JavaScript. You can inline your custom element definition just like you can inline anything else.