Typing of React hooks in Typescript

Hooks are now the better option to do effects in react. Using hooks with typescript can be complicated at first let’s dive in.