set type to use state react typescript code example
Example: type usestate typescript
interface Provider {
connected: boolean;
type: string;
}
const [wearablesList, setWearablesList] = useState<Provider[]>([]);
interface Provider {
connected: boolean;
type: string;
}
const [wearablesList, setWearablesList] = useState<Provider[]>([]);