how to set type for react usestatse function hooks code example
Example 1: type usestate typescript
interface Provider {
connected: boolean;
type: string;
}
const [wearablesList, setWearablesList] = useState<Provider[]>([]);
Example 2: type usestate([])
const [products, setProducts] = useState<Props[]>([]);