←back to thread

367 points lemonberry | 1 comments | | HN request time: 0.327s | source
Show context
ChrisMarshallNY ◴[] No.24641703[source]
I love her description of using a dependency-laden component:

> Using a custom element from the directory often needs to be preceded by a ritual of npm flugelhorn, import clownshoes, build quux, all completely unapologetically because “here is my truckload of dependencies, yeah, what”. Many steps are even omitted, likely because they are “obvious”. Often, you wade through the maze only to find the component doesn’t work anymore, or is not fit for your purpose.

That is so true. The "unapologetically" thing is important. I see this all the time. There's often a fair bit of 'tude, where I am looked at with condescension, for not knowing something "obvious."

The fig tree pic is perfect.

EDIT: Removed phrase that was possibly corrosive to the narrative.

replies(7): >>24641798 #>>24641833 #>>24641876 #>>24642200 #>>24642654 #>>24644698 #>>24651062 #
1. TiredGuy ◴[] No.24651062[source]
There are some lightweight approaches to web components. For example µce is extremely small and provides web components with no build step [1]. If you use the author's once-defined 140 byte library, you can also avoid having to bundle everything per component [2].

For those not quite ready to throw away frameworks, heresy [3] might be more up their alley, or if you're not as set on production readiness yet, check out my own barleytea.js [4] which is written in a little over 300 SLOC and has zero dependencies or necessary build steps.

I guess my point is, there is a good variety of microframeworks out there striving to meet this need.

[1] https://github.com/WebReflection/uce [2] https://github.com/WebReflection/once-defined [3] https://github.com/WebReflection/heresy [4] https://andrewfulrich.gitlab.io/barleytea/