Dabish Digital
Development

Signs it is time to revisit web components

There is no clever trick in this one, just a handful of decisions worth making deliberately. A few signals that web components is due some attention.

The question is rarely whether something can be built, but what it costs to keep running afterwards. Write the reasoning down alongside the decision, because the reasoning is what changes first.

The signals

  • Nobody can say when it was last reviewed
  • The answer depends on who you ask
  • Custom elements work without committing to a framework
  • Encapsulation stops styles leaking between features

How we handle it

Useful when several teams share one component set. The reasoning matters more than the rule, because the rule has exceptions. It rarely shows up as a line item, which is exactly why it slips.

How to tell if yours is fine

Code gets read far more often than it gets written, and usually by someone with less context than the author had. Three things worth confirming about web components before you move on:

  • Someone can say what the current setup is without going to look
  • Useful when several teams share one component set — and you know whether that is true here
  • There is a way to tell whether the last change to this helped

If you are not sure where your systems currently stand on this, it takes us about an hour to find out.