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