Using React Functional Components with Hooks in TypeScript

Ali Nasserzadeh
Level Up Coding
Published in
4 min readFeb 20, 2020

--

Photo by Émile Perron on Unsplash

Using TypeScript with React’s class components comes naturally as you simply extend the React.Component and immediately benefit from typing. When using React functional components however, some confusion may arise.

Reacts functional components are simply JavaScript functions, but this doesn’t mean that they don’t follow any constraints. Specifically, and most…

--

--