Skip to main content

Matt Smith

  • About
  • Elsewhere
Modern Web Engineering, Front-End First

Sometimes three boring statements beats one clever expression

2 min read

Modern JavaScript gives us a lot of expressive tools. Sometimes a little too many. Optional chaining, nullish coalescing, ternaries, spread, template literals. I like all of them and use them every day. But together, they make it really easy to cram a lot of logic into a single expression. I...

  • JavaScript

CSS does your tooltip positioning now

3 min read

If you’ve ever built a tooltip, a footnote, or a popover then you’ve written some version of this: const rect = trigger.getBoundingClientRect(); tooltip.style.top = `${rect.bottom + 8}px`; tooltip.style.left = `${rect.left}px`; Looks fine, until the window resizes. Or the page scrolls. Or the tooltip lands near the bottom of the viewport...

  • CSS

I stopped destructuring everything

2 min read

For a few years I destructured almost everything. Objects, props, parameters, return values. If there was an object, I destructured it. It wasn’t a conscious decision anymore, it was just what modern JavaScript looked like. I still use destructuring, but it’s not an automatic go-to for me now. Mainly because...

  • JavaScript
  • React
Older posts
GitHub
LinkedIn
CodePen
RSS
© 2026 Matt Smith. All rights reserved.