use any [] type in usestate code example Example: type usestate([]) const [products, setProducts] = useState<Props[]>([]);