Here are some examples for reference on Typescript usage.

import React, { useState } from 'react';

function App() {
  //example of multiple types declared on a variable
  const [number, setNumber] = useState<number | string>(10);

  const changeNumber = () => {
    setNumber("4") //This works because type can be either number or string

  return (


export defaults App;
$ yarn add tslint-react-hooks  --dev

this will create a separate entry in the package.json for 'development only' packages and place this typescript linter there.

  "devDependencies": {
    "tslint-react-hooks": "^2.2.2"

Scroll to Top