diff --git a/packages/core/useBluetooth/index.ts b/packages/core/useBluetooth/index.ts index 25fb88f2293..8e080223bde 100644 --- a/packages/core/useBluetooth/index.ts +++ b/packages/core/useBluetooth/index.ts @@ -1,5 +1,5 @@ import type { ComputedRef, Ref } from 'vue-demi' -import { computed, ref, watch } from 'vue-demi' +import { computed, ref, shallowRef, watch } from 'vue-demi' import { tryOnMounted, tryOnScopeDispose } from '@vueuse/shared' import type { ConfigurableNavigator } from '../_configurable' @@ -55,9 +55,9 @@ export function useBluetooth(options?: UseBluetoothOptions): UseBluetoothReturn const isSupported = useSupported(() => navigator && 'bluetooth' in navigator) - const device = ref(undefined) + const device = shallowRef(undefined) - const error = ref(null) + const error = shallowRef(null) watch(device, () => { connectToBluetoothGATTServer()