Hacker News new | ask | show | jobs
by lcnPylGDnU4H9OF 1061 days ago
> makes it much harder to query things

This seems overstated. It’s different but not really harder.

  document.querySelector('my-lit-element').elementIWant;

  class MyLitElement extends Lit {
    get elementIWant() {
      return this.renderRoot.querySelector(...);
    }
  }
Though, maybe one doesn’t like querying twice. I’m not sure of performance implications there, to be honest, but I’d expect it to be negligible in most cases.