State Machines in Vue: A Union Type, One Function and a Tiny useReducer

Summary

This article discusses how to implement state machines in Vue using TypeScript, highlighting the limitations of using multiple refs for state management. It introduces a discriminated union to define states and a transition function to handle state changes, ultimately proposing a custom `useReducer` composable for managing state in a more structured way. The approach aims to eliminate bugs associated with handling multiple states and improve code clarity.

State Machines in Vue: A Union Type, One Function and a Tiny useReducer
What Is a CLI I, and What It Means to Build One

What Is a CLI I, and What It Means to Build One

Certificates.dev

The Longest Line Of CSS?

The Longest Line Of CSS?

John Komarnicki

How to make Vue Dynamic Components more stable

How to make Vue Dynamic Components more stable

Jakub Andrzejewski