type of react hook setstate code example Example: type usestate([]) const [products, setProducts] = useState<Props[]>([]);