VueUse — the collection of Vue Composition API utilities — has released version 12 with over 20 new composables and important bundle size improvements.
useScreenWakeLock — prevent the screen from sleeping during video playback or presentationsuseWebBluetooth — interact with Bluetooth devices from the browseruseClipboardItems — read and write rich clipboard content (images, HTML)useTextareaAutosize — automatically resize a textarea to fit its contentVueUse 12 refactored its internal utilities so that each composable is fully tree-shakeable. Projects that import only a few composables will see significantly smaller bundles:
// Only useDark and useLocalStorage end up in your bundle
import { useDark, useLocalStorage } from '@vueuse/core'
npm install @vueuse/core@latest
All Comments