In his article Maciek Wątroba, a software engineer shared how much he loves TypeScript. He considers it to be a best practice when setting up a new React project.
“It is a great tool for improving developers’ productivity and avoiding some bugs. Getting started is easy, both create-react-app and nextjs come with built-in support.”
Just because of that he decided to demonstrate some techniques that we can use in our day to day work with TypeScript and React. Some of the things that Maciek covered are:
Use union types
Do not repeat yourself
If you want you can read the whole article from here.