Hooks were introduced to React in February 2019 to improve code readability. This time We are examining how hooks work with TypeScript.
Prior to hooks, React components used to have two flavors:
A natural use of these was to build complex container components with classes and simple presentational components with pure functions.
Container components handle state management and requests to the server, which will be then called in this article side effects. The state will be propagated to the container children through the props.
But as the…