Closed thiagopeluque closed 3 years ago
I tried to do like this
useEffect(() => { async function init() { const devices = await BluetoothSerial.scanDevices(); setDeviceList(devices); console.log(deviceList); } init();
return () => { async function remove() { await BluetoothSerial.stopScan(); console.log('Stop Scan'); } remove(); };
}, []);
It´s return an empty array
Anyone have an example??? please!!!
I tried to do like this
useEffect(() => { async function init() { const devices = await BluetoothSerial.scanDevices(); setDeviceList(devices); console.log(deviceList); } init();
}, []);
It´s return an empty array