Paweł Krystkiewicz

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.

Read article

2025

  1. Tailwind 4 dark mode dynamic themeTailwind 4 moved theme setup into CSS. I set up a dark mode theme that switches at runtime with the new config.

2024

  1. 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.
  2. 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.
  3. 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

  1. The magic of bookmarkletsBookmarklets run JavaScript from a bookmark. Here is how they work and how I write my own browser shortcuts.
  2. 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.
  3. Framer Motion: animating component appearance in ReactConditionally rendered components appear and disappear. This Framer Motion setup with AnimatePresence handles both.

2022

  1. 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.
  2. 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?
0