An Introduction to Vue 3 and Typescript: Component properties and events
Declaring a local state with references is a good start. Still, in all but the most simple cases, you will want your components to be able to interact with one another. That's where properties and events come into play.
In case you're after the code, check out this repos' branch