setState hooks typescript reactjs 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[]>([]);