Dermot Hughes

[ tag archive / 011 entries ]

Blog

Thoughts, musings, and whatever else I decide to dump from my mind.

Blog

[ 001 ] 13 Jun 2025 5 min read

Using @starting-style for Animations on First Render

Anyone who's ever tried to animate an element that fades or slides into view the moment it appears has realised it's not as easy as you think it should be. The good news: the CSS spec folks felt our pain and introduced the new @starting-style at-rule.

read entry
Blog

[ 002 ] 06 Jan 2025 6 min read

Why Snapshot Testing Sucks: Or, How I Learned to Stop Updating Snapshots and Write Better Tests

A pull request lands in your codebase, and the CI pipeline fails. A snapshot test broke. You open the diff and see ...a handful of seemingly random, tiny changes. You shrug, update the snapshots, and move on. This sucks.

read entry
Blog

[ 003 ] 08 Aug 2024 8 min read

Unlocking the Power of Compound Components in React

One of the patterns that can significantly improve our codebase is the Compound Component pattern. Today, we're diving deep into how this pattern works, the problems it solves, and some advanced techniques.

read entry
Blog

[ 004 ] 31 May 2023 3 min read

JavaScript Array Methods Cheatsheet

A simple cheatsheet for all the JavaScript Array Methods

read entry
Blog

[ 005 ] 20 Dec 2022 4 min read

Passing at least one optional prop with TypeScript

Setting if a prop is optional or not in TypeScript is really simple. But what if you have several optional props, you don't care which one is passed, but one of them has to? That's where Generics can save the day.

read entry
Blog

[ 006 ] 11 Jan 2022 1 min read

WTF are Design Tokens? | Belfast JS

I recently did a talk at Belfast JS on an introduction to Design Tokens. You can check out the recording here.

read entry
Blog

[ 007 ] 18 May 2021 1 min read

A neat dynamic glow effect for images

This will be a quick one. I've wondered for a while how Spotify do their dynamic colours from an album cover, so went down a rabbit hole. While I might look into a more accurate way , I discovered a neat trick for getting that dynamic glow effect on an image.

read entry
Blog

[ 008 ] 16 Jul 2020 4 min read

Is the title Front End Developer obsolete?

There has been an increasing issue where "Front End" just means anything to do with the browser or web. The shear amount of knowledge a Front End Developer apparently needed to know is so vast as to be impossible.

read entry
Blog

[ 009 ] 25 Jun 2020 3 min read

How to generate a PDF from a webpage with Node

How I generate a printable PDF version of my CV automatically every time I update it, using Node and a headless Chrome.

read entry
Blog

[ 010 ] 03 Apr 2020 2 min read

How to display a random cute animal on a 404 page

Hitting a 404 is usually an unpleasant experience so I'll try and balance that out with a pleasant one - and what does everyone love? Cute animals of course!

read entry
featured Blog

[ 011 ] 02 Apr 2020 2 min read

Sympathy for the Developer

How being a developer can make you a better designer.

read entry