Modeling React State as a Finite State MachineA modern approach using TypeScript discriminated unions and hooksDec 30, 2025·4 min read·59