Articles
React, TypeScript, CSS and frontend tooling. 10 articles since 2022.
Latest
Lessons learned: npm package publishing and API authorisation
Publishing an npm package failed with an auth error. I traced it to local config and the npm API, and show how to avoid it.
2025
2024
- Building a truncation detection hook for ReactTruncated text needs a tooltip only when it is actually cut off. This React hook detects that and toggles the tooltip.
- Managing UI decision complexity - from boolean soup to business rulesNested booleans for UI decisions get hard to follow. A small rules engine in React replaces them with named rules I can test.
- Framer Motion: animating height transitions in ReactCollapsible content needs a height that fits what is inside. This Framer Motion setup measures the content and sets the duration from its size.
2023
- The magic of bookmarkletsBookmarklets run JavaScript from a bookmark. Here is how they work and how I write my own browser shortcuts.
- The nuclear option: debugging broken layouts with CSS outlinesWhen a layout breaks, I outline every element to see its boundaries. One CSS rule shows the problem in seconds.
- Framer Motion: animating component appearance in ReactConditionally rendered components appear and disappear. This Framer Motion setup with AnimatePresence handles both.
2022
- Managing functional code plugins in React with lifecycle and useEffect cleanupThird-party plugins need setup and teardown alongside a component. I wire them through lifecycle and useEffect cleanup.
- TS/React #01: Where are my prop types?!You got yourself a nice third-party component, but there's a catch: it doesn't export its prop types. What now?