Articles

Articles all about the web, each focusing on a specific topic and providing code examples, detailed explanations, and more resources to explore.

Make FormData and input names type-safe in React


useActionState gives access to FormData, keeping inputs uncontrolled and extracting values by name. But is it all type-safe? Well, no. But we can fix it.

typescriptreact

Local-first client database migrations


Local database migrations is a required feature for all local-first apps. This example shows a strategy on how with Pglite using Drizzle and Effect.

typescriptpglitedrizzleeffectreact

All kinds of state management in React


Not all state is made equal in React. You may not need useState, Redux, TanStack Query or any other library. It depends to the kind of state you need to manage. These are your options.

typescriptreact

Patterns for composable tailwindcss styles


tailwindcss has everything that you need to compose styles, especially since v4. These are some patterns that I often use to keep my styles centered around tailwindcss.

csstailwindcss

The example that made me get CSS subgrid


Some new CSS features are hard to put in practice, especially when there are some (not so painful) workarounds. CSS subgrid is different, learn it and you will never do without it ever again.

csshtml