Here we refactor a React TypeScript class component to a function component with a useState hook and discuss how props and state types can be modeled accordingly.