Hacker Newsnew | past | comments | ask | show | jobs | submit | sleazebreeze's commentslogin

I noticed that too, I had to re-read it a few times to make sure I was understanding it properly, it seemed so out of place. Then I read the rest of the article and realized this guy has zero perspective on anything.


I just evaluated Lit for work and while we didn't go with it, it was very nice. I love the base custom elements API regardless of using Lit or not, turns out that's all you really need to make intricate UIs that feel seamless.


Something about Lit/web components that's not written clearly on the label is the hoops you have to jump through to style elements. If you're using tailwind in the whole app, you just want to pull it into your custom elements without much boilerplate. My main app compiles a single minified app.css, it felt not so modular to now include that in every single component. The alternative is create a subclass that injects tailwind into Lit components. It'd be perfect it just had a switch to inherit everything the page already has.


> It'd be perfect it just had a switch to inherit everything the page already has.

It does! <https://lit.dev/docs/components/shadow-dom/>

By default, Lit renders into shadow DOM. This carries benefits like encapsulation (including the style encapsulation you mention). If you prefer global styles, you can render into light DOM instead with that one-line switch.

However, shadow DOM is required for slotting (composing) components, so typically what I'd recommend for theming is leveraging the array option of each component's styles:

    static styles = [themeStyles, componentStyles]
Then you define your shared styles in `themeStyles`, which is shared across all components you wish to have the same theme.


I also made a simple lib to make it easy to implement common styles in your Lit components:

https://github.com/gitaarik/lit-style


oh nice! I didn't know that you can just make it use light dom.

  protected createRenderRoot() {
    return this;
  }
And that's what it takes! I like using tailwind/utility classes so for the styles I'd need to have layers of compiled css files rather than one giant one.


The major downside of using light DOM is that elements cannot compose neatly since there's no delineating between what the component itself rendered and child content.

When you need to re-render your component, how does the component know not to replace the child content you rendered, Vs the child content it rendered into the light DOM. That's why the shadow DOM and slots were necessary, because then there's no intermingling of your content Vs the component's

This may not be a problem if you don't intend to compose your components. But if you do you will hit limits quickly


There's a long standing standards issue for this: https://github.com/WICG/webcomponents/issues/909

While you can easily turn rendering to shadow DOM off on a per-component basis, that removes the ability to use slots. It only really works for leaf nodes.

Pulling a stylesheet into every component is actually not bad though. Adopted stylesheets allow you to share the same stylesheet instance across all shadow roots, so it's quite fast.


Interesting, I'd be curious to know why you all decided not to go with it if you're open to sharing! Minimally to know if I should look at any other promising frameworks.


I see a good case for my company to use Lit for creating complex components such as highly interactive panels/widgets to be shared between React/Angular apps in our large ecosystem. However the decision was: 1. Prefer sharing plain JS/TS over framework code so try that first and 2. if the component is so complex and tricky to get right, it probably needs to be re-implemented in each framework anyways (or some sort of wrapper)

My secondary concern with Lit is the additional complexity of using shadow and light DOM together in long lived React/Angular apps. Adding a new paradigm for 75+ contributors to consider has a high bar for acceptance.


Ah yeah, definitely a much different equation when introducing this across many apps as a shared component library. Mixing different DOM abstractions together could get tricky for sure.

And yes attempting to add a new paradigm for that many people is I am sure quite the task. More political than technical in many ways as well.

Thanks for sharing!


What did you go with?


Props to Sean for this post. I have found his writings to be much closer to how I’ve learned to understand my career and companies than many standard reddit/HN posts portray things.


Some of the HN comments iver the years though are really in line with this post. They have protected me from a lot of emotional anguish.


and around and around we'll go again!


Schmoozers learned grit and grind? That's opposite of my experience and observations.

What role do you play in the educational neglect? I am not sure I understand the decline here.


> What role do you play in the educational neglect?

Not the person you're responding to, but that's uncalled for.

There are many variables that go into a child's development. The parents are merely one of them. They can do their best and things can still go south.


from my understanding of educational outcomes, the BIGGEST factor in a child’s success in school is their home life. At least for K-12. Multiple studies come to this conclusion.

Obviously “home life” encompasses many things like parental involvement, stability of family relationships, socioeconomic status, etc. And it’s not the only factor of course.

So the question is hardly uncalled for IMO. Could have been worded in a less accusatory tone though! The person was pretty rude.


145 -> 120 IQ decline

Because I can’t access good schools and teachers. Because I didn’t schmooze to the admissions directors and other gate keepers.

I should’ve worn better clothes, driven a Porsche, and displayed the right shibboleths. Except that even now I’m too immature and stupid to know what they are.


>Except that even now I’m too immature and stupid to know what they are.

This is the bigger problem, not the type of car or clothes you drive. I dress like a schlub and drive a Toyota and don't feel any of the social pressures you're talking about. I think it's in your head.

>145 -> 120 IQ decline

You're also putting way way too much emphasis on this test. The methodology of IQ tests is also entirely questionable. I'd hardly be judging myself as a parent based on this.


> I think it's in your head.

It may be, but it also could be the community/town he lives in. I certainly do know schools where you need to play games to get admission, and dressing like a schlub would exclude you (which is fine, given I have alternatives - he perhaps doesn't).

> The methodology of IQ tests is also entirely questionable. I'd hardly be judging myself as a parent based on this.

Fully agree on ignoring the IQ (why would one even get it tested?)

However, I suspect he does see other signals of decline, and sees those who went to the school achieve more.


AI probably generated all of that and the OP didn't even review its output.


RIP, end of an era. Thank you everyone who worked on this, it was an extraordinarily useful and reliable project.


Aren't all these transactions checked by a human after the fact? IIRC I interviewed someone who worked on this and thats what they said.


from https://www.cnn.com/2024/04/03/business/amazons-self-checkou...

   Amazon had used roughly 1,000 humans in India, according to some news reports, to help monitor accurate checkouts. The company told CNN it’s “reducing the number of human reviews” while developing the “Just Walk Out” technology. Amazon said besides data associates’ main role in working on the underlying technology, they also “validate a small minority” of shopping visits.


So they released the product before they even developed it. The sad state of software nowadays


Yes, it was the mechanical turk solution.


Contrary to the OP, there is a useless chatbot on the Amazon homepage ("Rufus" sparkle button).


ANPRs are very popular and common in the EU. More so than in the US, even.


Yes, they are the key tech behind "average speed enforcement zones", where you get ticketed for speeding based on your "entry/exit" timestamps on a section of road.


The linked new articles talk about some private company selling camera access to law enforcement. I don't think that's a popular setup in the EU, EU law enforcement/traffic authorities seems more likely to run the cameras themselves.


In the US, it's because of our protections that, ironically, we're at this point. This is essentially laundering the 4th Amendment through private industry, which has been a masaive issue for many years now.


EU is the birthplace of this type of tech usage.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: