ThanhDev
  • Articles
  • Categories
  • Tags
  • About

ThanhDev

Frontend engineering notes on React, Next.js, TypeScript and software architecture.

  • Articles
  • Categories
  • Tags
  • About
  • GitHub
  • LinkedIn
  • Website
  • Email

© 2026 ThanhDev. Built with Next.js, Prisma and PostgreSQL.

Category

TypeScript

Type design that catches bugs at compile time instead of in review.

  • TypeScript

    TypeScript Discriminated Unions for Safer UI State

    Four booleans give you sixteen states, and twelve of them are nonsense. Model the four you actually have instead.

    • #TypeScript
    • #React
    Aug 23, 2026•2 min read•543 views