To get a faster FCP, statically rendering the component to HTML and re-hydrating it in the client (using Gatsby, for example) seems like it will have a bigger impact than the WebComponent library used. Unless the client is bandwidth constrained of course.
Ways to make a web component
21–30 of 200 posts
Re: Ways to make a web component
#22Super cool, thanks for this! Now regarding the results: Are there any actual usecases where one would choose Angular over some other library? From what i’ve seen from before and now this, i am not aware of a single reason why would anyone choose to use it, if they are not constrained by legacy codebase or if there are no stubborn developers who swear by it.
2) This is sticking Angular inside a WebComponent with the minimal amount to make a counter - but you wouldn't take a heavy library to make a counter. Imagine React + Redux + Redux-Observables + StyledComponents just to make a counter. It's like hitting a nail with a ICBM.
Re: Ways to make a web component
#23For the same reason, only the first example in this page would do for me (the one based on standard without using any library). But I suppose that for actually publishing something, such library would be needed, if anything for polyfills for older browsers (but then again, we don't expect published work to stand for decades without changes, so maybe the call for standardized technology is not as strong there).
Re: Ways to make a web component
#24Earlier quoted context omitted.
This isn't a collection of ways to "build components for the web" though, it's a set of ways to build "web components" the W3C component standard that ships natively in all modern browsers. Even those these components are built with different libraries, they are all interoperable and require no framework to use them, so I'd say this points to the defragmented future of web development.
Edit: D'oh, I misread it, sorry. You misread this post. The left panel has all the different popular libraries and frameworks that can be used to build a web component, including things like React, Svelte, Vue, etc.
Re: Ways to make a web component
#25I'm not into web development at all so this sounds very new to me, but aren't components in general meant to be self-contained so that they can be reused as "building blocks" for larger applications (or pages, i guess)? Doesn't using a framework in this case mean that you also have to at least bundle that framework with the component? What happens if you want 10 components that each use a different framework? Or some…
Bundle everything? Yep. Self contained? Yep. 10 components that open connections to 10 different severs? Yep.
The web is so massive that there is a way for pretty much everything (though for some reason webdevs try not to admit this).
Re: Ways to make a web component
#26Alternate title: The fractured state of web UI design explained using a simple counter. I say that only slightly in jest, as it is a neat way to show all (or most) of your options. Although it doesn't have my at-the-moment favorite way to make web components, blazor/web assembly. For me, it's made front-end development fun again, which I haven't enjoyed in a long time.
[deleted]
Re: Ways to make a web component
#27Re: Ways to make a web component
#28I've rewrote the frontend of one of my personal apps from react to webcomponents lately. For me, the most interesting aspect was that it's part of standards, requiring no dependency, so it means that I can use this app for decades without having to maintain it. For the same reason, only the first example in this page would do for me (the one based on standard without using any library). But I suppose that for actuall…
That seems highly optimistic to me.
Re: Ways to make a web component
#29I'm not into web development at all so this sounds very new to me, but aren't components in general meant to be self-contained so that they can be reused as "building blocks" for larger applications (or pages, i guess)? Doesn't using a framework in this case mean that you also have to at least bundle that framework with the component? What happens if you want 10 components that each use a different framework? Or some…
There are ways you can coordinate the components and their dependencies to rely on the same versions, but this will probably assume they are your components.
Svelte does something kind of similar where it doesn’t share the same bits between components, but according to the creator it the theoretical point at where it would be more beneficial to have share is so far off to be pointless. So presumably if you have something that efficient you won’t have to worry so much, I think we are a ways away
Re: Ways to make a web component
#30Alternate title: The fractured state of web UI design explained using a simple counter. I say that only slightly in jest, as it is a neat way to show all (or most) of your options. Although it doesn't have my at-the-moment favorite way to make web components, blazor/web assembly. For me, it's made front-end development fun again, which I haven't enjoyed in a long time.
Compared to the myriad ways for different cultures to make chicken with rice, this is nothing.