vueuse

Collection of essential Vue Composition Utilities for Vue 2 and 3

v9.13.0 by github-actions[bot]github-actions[bot]

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v9.12.0 by github-actions[bot]github-actions[bot]

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v9.11.1 by github-actions[bot]github-actions[bot]

   🚀 Features

    View changes on GitHub

v9.11.0 by github-actions[bot]github-actions[bot]

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v9.10.0 by github-actions[bot]github-actions[bot]

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v9.9.0 by github-actions[bot]github-actions[bot]

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v9.8.2 by github-actions[bot]github-actions[bot]

   🐞 Bug Fixes

    View changes on GitHub

v9.8.1 by github-actions[bot]github-actions[bot]

   🐞 Bug Fixes

  • useStorage: Resume the watch after setting the value, fix loop updates  -  by @antfu (c3851)
    View changes on GitHub

v9.8.0 by github-actions[bot]github-actions[bot]

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v9.7.0 by github-actions[bot]github-actions[bot]

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v9.6.0 by github-actions[bot]github-actions[bot]

   🐞 Bug Fixes

    View changes on GitHub

v9.5.0 by github-actions[bot]github-actions[bot]

   🚀 Features

  • onClickOutside: Support options in component  -  by @fiadone and @sibbng in #2391
  • useEventListener: Accept multiple events or listeners  -  by @vaakian and @antfu in #2180
  • useFetch: Allow configure lifecycle handler behavior  -  by @climba03003 in #2333
  • useFetch: Support sending the custom request to an absolute URL regardless baseURL  -  by @sun0day in #2210
  • useGeolocation: Pause and resume controls  -  by @benax-se in #2376
  • useIDBKeyval: New integration - Idb-keyval wrapper  -  by @Harmony222 in #2335
  • useWebsocket: Url to be ref/computed  -  by @rotu in #2367

   🐞 Bug Fixes

  • onClickOutside: Access correct document  -  by @sibbng in #2404
  • usePointerSwipe: Handle secondary clicks properly  -  by @curtgrimes in #2379
  • useScroll: The expected result cannot be returned after setting the throttle parameter  -  by @LittleSound in #2390
  • useWebSocket: Don't hide pong setTimeout reference  -  by @kellerza and @antfu in #2206
    View changes on GitHub

v9.4.0 by github-actions[bot]github-actions[bot]

   🚀 Features

   🐞 Bug Fixes

  • useCounter: Set and reset should also be limited  -  by @iChengbo in #2179
  • useRouteHash, useRouteParams, useRouteQuery: Override only selected route param  -  by @dvh91 in #2350
  • useWebSocket: Don't reconnect WebSocket if close issued between retries  -  by @rotu in #2330
  • watchThrottled: Wait incorrect remaining time  -  by @sun0day in #2267
    View changes on GitHub

v9.3.1 by github-actions[bot]github-actions[bot]

   🚀 Features

   🐞 Bug Fixes

  • nuxt: Wrap ssr plugin in defineNuxtPlugin  -  by @dan-online in #2326
  • useBluetooth: Use shallowRef for bluetooth instance  -  by @antfu (0199b)
  • useFetch: Fix incorrect chainCallbacks behavior  -  by @GODLiangCY in #2231
  • useFirestore: Auto dispose documents  -  by @Zehir in #2318
  • useStorage: Fixed data desynchronization in case of clearing storage  -  by @yuryrudey in #2221
  • useTitle: Prevent observe and titleTemplate been specified at the same time  -  by @huynl-96 and @antfu in #2049
    View changes on GitHub

v9.3.0 by github-actions[bot]github-actions[bot]

   🚀 Features

  • Optional callback for useInterval, useTimeout & useTimestamp  -  by @Waleed-KH in #2240
  • onClickOutside: Add bubble modifier to directive  -  by @sibbng in #2183
  • onKeyStroke: Support capture all handler  -  by @azaleta in #2197
  • useAxios: Improve type  -  by @azaleta in #2208
  • useAxios: Add second generic type to error  -  by @azaleta in #2248
  • useAxios: Add option for choosing shallowRef or ref  -  by @jahnli in #2251
  • useDateFormat: Support MMM and MMMM formatter  -  by @777Vasya77 in #2234
  • useDateFormat: Support meridiem format  -  by @huynl-96 in #2011
  • useFirestore: Support dependent queries  -  by @kiyopikko in #2103
  • useMediaQuery: Allow query to be a ref  -  by @GODLiangCY in #2178
  • useScroll: Support setting scroll position and toggling smooth scrolling  -  by @curtgrimes in #1996
  • useTimeAgo: New showSecond option  -  by @azaleta in #2209

   🐞 Bug Fixes

    View changes on GitHub

v9.2.0 by github-actions[bot]github-actions[bot]

   🚨 Breaking Changes

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v9.1.1 by github-actions[bot]github-actions[bot]

   🚀 Features

   🐞 Bug Fixes

  • firebase: Improve externalization  -  by @antfu (e2a78)
  • shared: Resolve internal circular reference  -  by @antfu (0fdbb)
  • useActiveElement: Use computedWithControl instead of counter ref  -  by @vaakian in #2093
  • useElementHover: Support set el ref type  -  by @JiatLn in #2079
  • useScroll: Account for rounding errors when calculating arrivedState  -  by @curtgrimes in #2051
  • useURLSearchParams: Avoid referencing to global location  -  by @mskr in #2066
    View changes on GitHub

v9.1.0 by github-actions[bot]github-actions[bot]

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v9.0.2 by github-actions[bot]github-actions[bot]

   🐞 Bug Fixes

  • nuxt: Disable auto import for integrations  -  by @antfu (0a43b)
    View changes on GitHub

v9.0.1 by github-actions[bot]github-actions[bot]

   🚀 Features

   🐞 Bug Fixes

  • useColorMode: When emitAuto is true, onChanged does not trigger when preferredMode changed  -  by @Waleed-KH in #2004
  • useFetch: Broken callbacks when RequestInit and UseFetchOptions are both passed in  -  by @curtgrimes in #2013
    View changes on GitHub

v9.0.0 by github-actions[bot]github-actions[bot]

   🚨 Breaking Changes

  • all: isSupported becomes Ref<boolean> instead of boolean for SSR compatibility  -  by @okxiaoliang4 in #1800
  • all: Rename function options type with consistant Use prefix, huge thanks to @okxiaoliang4! (this should not affect most of the usage case, unless you are importing those types directly)
    • All Changes
      • useSpeechSynthesis: Rename type Status to UseSpeechSynthesisStatus  -  by @antfu (db61f)
      • onKeyStroke: Rename type KeyStrokeOptions to OnKeyStrokeOptions  -  by @okxiaoliang4 in #1807
      • useAsyncState: Rename type AsyncStateOptions to UseAsyncStateOptions  -  by @okxiaoliang4 in #1809
      • useClipboard: Rename type ClipboardOptions to UseClipboardOptions and ClipboardReturn to UseClipboardReturn  -  by @okxiaoliang4 in #1861
      • useElementVisibility: Rename type VisibilityScrollTargetOptions to UseElementVisibilityOptions  -  by @okxiaoliang4 in #1863
      • useEventSource: Return type should be UseEventSourceReturn  -  by @okxiaoliang4 in #1864
      • useFavicon: Rename type FaviconOptions to UseFaviconOptions  -  by @okxiaoliang4 in #1865
      • useFocusWithin: Rename type FocusWithinReturn to UseFocusWithinReturn  -  by @okxiaoliang4 in #1866
      • useGeolocation: Rename type GeolocationOptions to UseGeolocationOptions  -  by @okxiaoliang4 in #1868
      • useIdle: Rename type IdleOptions to UseIdleOptions  -  by @okxiaoliang4 in #1869
      • useIntersectionObserver: Rename type IntersectionObserverOptions to UseIntersectionObserverOptions  -  by @okxiaoliang4 in #1870
      • useJwt: Rename type JwtOptions to UseJwtOptions and JwtResult to UseJwtReturn  -  by @okxiaoliang4 in #1899
      • useKeyModifier: Rename type ModifierOptions to UseModifierOptions  -  by @okxiaoliang4 in #1871
      • useMagicKeys: Rename type MagicKeys to UseMagicKeysReturn  -  by @okxiaoliang4 in #1873
      • useMemoize: Rename type UseMemoizedFn to UseMemoizeReturn and new type UseMemoizeOptions  -  by @okxiaoliang4 in #1872
      • useMemory: Rename type MemoryOptions to UseMemoryOptions  -  by @okxiaoliang4 in #1605
      • useMouse: Rename type MouseOptions to UseMouseOptions  -  by @okxiaoliang4 in #1877
      • useMutationObserver: Rename type MutationObserverOptions to UseMutationObserverOptions  -  by @okxiaoliang4 in #1884
      • useParallax: Rename type ParallaxOptions to UseParallaxOptions and ParallaxReturn to UseParallaxReturn  -  by @okxiaoliang4 in #1885
      • usePointerSwipe: Rename type PointerSwipeOptions to UsePointerSwipeOptions and PointerSwipeReturn to UsePointerSwipeReturn  -  by @okxiaoliang4 in #1886
      • useRTDB: Rename type RTDBOptions to UseRTDBOptions  -  by @okxiaoliang4 in #1901
      • useRafFn: Rename type RafFnOptions to UseRafFnOptions  -  by @okxiaoliang4 in #1887
      • useResizeObserver: Rename type ResizeObserverOptions to UseResizeObserverOptions  -  by @okxiaoliang4 in #1862
      • useShare: Rename type ShareOptions to UseShareOptions  -  by @okxiaoliang4 in #1888
      • useSpeechRecognition: Rename type SpeechRecognitionOptions to UseSpeechRecognitionOptions  -  by @okxiaoliang4 in #1889
      • useSpeechSynthesis: Rename type SpeechSynthesisOptions to UseSpeechSynthesisOptions  -  by @okxiaoliang4 in #1890
      • useSpeechSynthesis: Remove voiceInfo, allow voice as ref  -  by @sibbng in #1882
      • useStorage: Rename type StorageOptions to UseStorageOptions  -  by @okxiaoliang4 in #1867
      • useStorageAsync: Rename type StorageAsyncOptions to UseStorageAsyncOptions  -  by @okxiaoliang4 in #1883
      • useSwipe: Rename type SwipeOptions to UseSwipeOptions and SwipeReturn to UseSwipeReturn  -  by @okxiaoliang4 in #1891
      • useTimestamp: Rename type TimestampOptions to UseTimestampOptions  -  by @okxiaoliang4 in #1892
      • useTransition: Rename type TransitionOptions to UseTransitionOptions  -  by @okxiaoliang4 in #1893
      • useVModel: Rename type VModelOptions to UseVModelOptions  -  by @okxiaoliang4 in #1894
      • useWebSocket: Rename type WebSocketOptions to UseWebSocketOptions and WebSocketResult to UseWebSocketReturn  -  by @okxiaoliang4 in #1895
      • useWebWorkerFn: Rename type WebWorkerOptions to UseWebWorkerOptions  -  by @okxiaoliang4 in #1896
      • useWindowSize: Rename type WindowSizeOptions to UseWindowSizeOptions  -  by @okxiaoliang4 in #1897
      • useInterval: Rename type IntervalOptions to UseIntervalOptions  -  by @okxiaoliang4 in #1945
      • useIntervalFn: Rename type IntervalFnOptions to UseIntervalFnOptions  -  by @okxiaoliang4 in #1943
      • useTimeoutFn,useTimeout: Rename type TimeoutOptions to UseTimeoutOptions and TimeoutFnOptions to UseTimeoutFnOptions  -  by @okxiaoliang4 in #1944
  • firebase: Support firebase 9 modular  -  by @antfu (9c65f)
  • math: Move logicAnd, logicOr, logicNot, useClamp to @vueuse/math  -  by @antfu in #1794, #1810
  • reactify: Enable support for reactive getter by default  -  by @antfu in #1860
  • useThrottleFn: trailing option should be false by default  -  by @webfansplz and @antfu in #1687
  • useMagicKeys: Store key instead of keyCode in current  -  by @wvffle in #1506

   🚀 Features

  • all: Support reactive getter as argument  -  in #1768
    This introduces a new convention of passing reactive getters as arguments. Previously, many of VueUse functions supported a convention to accept optional Ref as arguments (MaybeRef<T>) to make the reactivity connections. For example:
    // pass plain value
    const title = useTitle('foo') // changes title to 'foo'
    
    // pass a ref
    const myTitle = ref('foo')
    useTitle(myTitle) // changes title to 'foo'
    
    // reactive triggers the update
    myTitle.value = 'bar' // changes title to 'bar'
    

    Since v9.0, most of the VueUse function also accepts a getter function similar to computed or the watch source of watch to provide better flexibility.
    // before
    const title = computed(() => `${foo.value} | template`)
    useTitle(title)
    
    // with 9.0
    useTitle(() => `${foo.value} | template`)
    

    It also works great with Reactivity Transform.
    // before
    const title = $('foo')
    useTitle($$(title)) // you need to use $$() to preserve the reactive
    
    // with 9.0
    const title = $('foo')
    useTitle(() => title) // you can use a getter function just like `watch`
    
  • math: New @vueuse/math package
  • New Array-related utilities
  • syncRef: Support custom transforms  -  by @chaii3 and @antfu in #1968
  • useAsyncState: Add throwError option  -  by @TuiMao233 and @antfu in #1975
  • useColorMode: New initialValue option  -  by @antfu (fcaf9)
  • useStorage: mergeDefaults option  -  by @webfansplz and @antfu in #1957
  • useTextDirection: New function  -  by @iChengbo and @antfu in #1678

   🐞 Bug Fixes

  • nuxt: Support import submodules for @vueuse/integrations  -  by @antfu (18ba0)
  • onClickOutside: Fix handler type  -  by @sibbng in #1961
  • useOffsetPagination: Incorrectly currentPageSize value  -  by @webfansplz in #1949
  • useSpeechSynthesis: Remove duplicated onend, fix demo  -  by @sibbng in #1941
  • useWebSocket: Set initial status as CLOSED  -  by @chaii3 in #1960
  • useNProgress: Improve SSR support  -  by @webfansplz in #1990
    View changes on GitHub

v9.0.0-beta.2 by github-actions[bot]github-actions[bot]

   🚨 Breaking Changes

   🚀 Features

    View changes on GitHub

v9.0.0-beta.1 by github-actions[bot]github-actions[bot]

   🚨 Breaking Changes

  • useInterval: Rename type IntervalOptions to UseIntervalOptions  -  by @okxiaoliang4 in #1945
  • useIntervalFn: Rename type IntervalFnOptions to UseIntervalFnOptions  -  by @okxiaoliang4 in #1943
  • useTimeoutFn,useTimeout: Rename type TimeoutOptions to UseTimeoutOptions and TimeoutFnOptions to UseTimeoutFnOptions  -  by @okxiaoliang4 in #1944

   🐞 Bug Fixes

  • nuxt: Support import submodules for @vueuse/integrations  -  by @antfu (18ba0)
  • onClickOutside: Fix handler type  -  by @sibbng in #1961
  • useOffsetPagination: Incorrectly currentPageSize value  -  by @webfansplz in #1949
  • useSpeechSynthesis: Remove duplicated onend, fix demo  -  by @sibbng in #1941
  • useWebSocket: Set initial status as CLOSED  -  by @chaii3 in #1960
    View changes on GitHub

v9.0.0-beta.0 by github-actions[bot]github-actions[bot]

   🚨 Breaking Changes

  • all: isSupported becomes Ref<boolean> instead of boolean for SSR compatibility  -  by @okxiaoliang4 in #1800
  • all: Rename function options type with consistant Use prefix, huge thanks to @okxiaoliang4! (this should not affect most of the usage case, unless you are importing those types directly)
    • All Changes
      • useSpeechSynthesis: Rename type Status to UseSpeechSynthesisStatus  -  by @antfu (db61f)
      • onKeyStroke: Rename type KeyStrokeOptions to OnKeyStrokeOptions  -  by @okxiaoliang4 in #1807
      • useAsyncState: Rename type AsyncStateOptions to UseAsyncStateOptions  -  by @okxiaoliang4 in #1809
      • useClipboard: Rename type ClipboardOptions to UseClipboardOptions and ClipboardReturn to UseClipboardReturn  -  by @okxiaoliang4 in #1861
      • useElementVisibility: Rename type VisibilityScrollTargetOptions to UseElementVisibilityOptions  -  by @okxiaoliang4 in #1863
      • useEventSource: Return type should be UseEventSourceReturn  -  by @okxiaoliang4 in #1864
      • useFavicon: Rename type FaviconOptions to UseFaviconOptions  -  by @okxiaoliang4 in #1865
      • useFocusWithin: Rename type FocusWithinReturn to UseFocusWithinReturn  -  by @okxiaoliang4 in #1866
      • useGeolocation: Rename type GeolocationOptions to UseGeolocationOptions  -  by @okxiaoliang4 in #1868
      • useIdle: Rename type IdleOptions to UseIdleOptions  -  by @okxiaoliang4 in #1869
      • useIntersectionObserver: Rename type IntersectionObserverOptions to UseIntersectionObserverOptions  -  by @okxiaoliang4 in #1870
      • useJwt: Rename type JwtOptions to UseJwtOptions and JwtResult to UseJwtReturn  -  by @okxiaoliang4 in #1899
      • useKeyModifier: Rename type ModifierOptions to UseModifierOptions  -  by @okxiaoliang4 in #1871
      • useMagicKeys: Rename type MagicKeys to UseMagicKeysReturn  -  by @okxiaoliang4 in #1873
      • useMemoize: Rename type UseMemoizedFn to UseMemoizeReturn and new type UseMemoizeOptions  -  by @okxiaoliang4 in #1872
      • useMemory: Rename type MemoryOptions to UseMemoryOptions  -  by @okxiaoliang4 in #1605
      • useMouse: Rename type MouseOptions to UseMouseOptions  -  by @okxiaoliang4 in #1877
      • useMutationObserver: Rename type MutationObserverOptions to UseMutationObserverOptions  -  by @okxiaoliang4 in #1884
      • useParallax: Rename type ParallaxOptions to UseParallaxOptions and ParallaxReturn to UseParallaxReturn  -  by @okxiaoliang4 in #1885
      • usePointerSwipe: Rename type PointerSwipeOptions to UsePointerSwipeOptions and PointerSwipeReturn to UsePointerSwipeReturn  -  by @okxiaoliang4 in #1886
      • useRTDB: Rename type RTDBOptions to UseRTDBOptions  -  by @okxiaoliang4 in #1901
      • useRafFn: Rename type RafFnOptions to UseRafFnOptions  -  by @okxiaoliang4 in #1887
      • useResizeObserver: Rename type ResizeObserverOptions to UseResizeObserverOptions  -  by @okxiaoliang4 in #1862
      • useShare: Rename type ShareOptions to UseShareOptions  -  by @okxiaoliang4 in #1888
      • useSpeechRecognition: Rename type SpeechRecognitionOptions to UseSpeechRecognitionOptions  -  by @okxiaoliang4 in #1889
      • useSpeechSynthesis: Rename type SpeechSynthesisOptions to UseSpeechSynthesisOptions  -  by @okxiaoliang4 in #1890
      • useSpeechSynthesis: Remove voiceInfo, allow voice as ref  -  by @sibbng in #1882
      • useStorage: Rename type StorageOptions to UseStorageOptions  -  by @okxiaoliang4 in #1867
      • useStorageAsync: Rename type StorageAsyncOptions to UseStorageAsyncOptions  -  by @okxiaoliang4 in #1883
      • useSwipe: Rename type SwipeOptions to UseSwipeOptions and SwipeReturn to UseSwipeReturn  -  by @okxiaoliang4 in #1891
      • useTimestamp: Rename type TimestampOptions to UseTimestampOptions  -  by @okxiaoliang4 in #1892
      • useTransition: Rename type TransitionOptions to UseTransitionOptions  -  by @okxiaoliang4 in #1893
      • useVModel: Rename type VModelOptions to UseVModelOptions  -  by @okxiaoliang4 in #1894
      • useWebSocket: Rename type WebSocketOptions to UseWebSocketOptions and WebSocketResult to UseWebSocketReturn  -  by @okxiaoliang4 in #1895
      • useWebWorkerFn: Rename type WebWorkerOptions to UseWebWorkerOptions  -  by @okxiaoliang4 in #1896
      • useWindowSize: Rename type WindowSizeOptions to UseWindowSizeOptions  -  by @okxiaoliang4 in #1897
  • math: Move logicAnd, logicOr, logicNot, useClamp to @vueuse/math  -  by @antfu in #1794, #1810
  • reactify: Enable support for reactive getter by default  -  by @antfu in #1860
  • useThrottleFn: trailing option should be false by default  -  by @webfansplz and @antfu in #1687
  • useMagicKeys: Store key instead of keyCode in current  -  by @wvffle in #1506

   🚀 Features

  • all: Support reactive getter as argument  -  in #1768
    This introduces a new convention of passing reactive getters as arguments. Previously, many of VueUse functions supports a convention to accept optional Ref as arguments (MaybeRef<T>) to making the reactivity connections. For example:
    // pass plain value
    const title = useTitle('foo') // changes title to 'foo'
    
    // pass a ref
    const myTitle = ref('foo')
    useTitle(myTitle) // changes title to 'foo'
    
    // reactive triggers the update
    myTitle.value = 'bar' // changes title to 'bar'
    

    Since v9.0, most of the VueUse function also accepts a getter function similar to computed or the watch source of watch to provide better flexibility.
    // before
    const title = computed(() => `${foo.value} | template`)
    useTitle(title)
    
    // with 9.0
    useTitle(() => `${foo.value} | template`)
    

    It also works great with Reactivity Transform.
    // before
    const title = $('foo')
    useTitle($$(title)) // you need to use $$() to preseve the reactive
    
    // with 9.0
    const title = $('foo')
    useTitle(() => title) // you can use a getter function just like `watch`
    
  • math: New @vueuse/math package
  • New Array related utilities
    View changes on GitHub

v8.9.4 by github-actions[bot]github-actions[bot]

   🐞 Bug Fixes

    View changes on GitHub

v8.9.3 by github-actions[bot]github-actions[bot]

   🐞 Bug Fixes

    View changes on GitHub

v8.9.2 by github-actions[bot]github-actions[bot]

   🚀 Features

   🐞 Bug Fixes

  • useMagicKeys: Fix setting properties of undefined value  -  by @Matrixbirds in #1856
    View changes on GitHub

v8.9.1 by github-actions[bot]github-actions[bot]

   🐞 Bug Fixes

    View changes on GitHub

v8.9.0 by github-actions[bot]github-actions[bot]

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v8.8.1 by github-actions[bot]github-actions[bot]

   🚀 Features

  • computedWithControl: Support manual triggering  -  by @antfu (01fca)

   🐞 Bug Fixes

  • computedWithControl: trigger only work in Vue 3  -  by @antfu (a1077)
  • useMediaQuery: Check if window.matchMedia is a function  -  by @dfreier in #1765
    View changes on GitHub

v8.8.0 by github-actions[bot]github-actions[bot]

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v8.7.5 by github-actions[bot]github-actions[bot]

   🐞 Bug Fixes

  • useBluetooth:
    View changes on GitHub

v8.7.4 by github-actions[bot]github-actions[bot]

v8.7.3 by github-actions[bot]github-actions[bot]

v8.7.2 by github-actions[bot]github-actions[bot]

v8.7.1 by github-actions[bot]github-actions[bot]

v8.7.0 by github-actions[bot]github-actions[bot]

   🚀 Features

  • until:
    • Improved until types #1493
  • useImage:

   🐞 Bug Fixes

  • onClickOutside:
    • Avoid calling safari workaround on right click #1673
  • unrefElement:
    • Don't return the Vue instance when $el is null/undefined #1657
  • useFetch:
    • Ssr compactible for headersToObject 8f541b0a
  • useIntervalFn:
    • Watch interval correctly #1676
  • useMagicKeys:
    • getModifierState is not function error in Chrome #1654
  • useScroll:
    • Compatibility for mobile #1663
  • useUrlSearchParams:
    • Preserve history state when updating query #1661
  • watch*:
    • Fix T type for WatchCallback #1692

   ❤️ Contributors

   Thanks to @antfu | @arcs- | @DrJume | @HannesOberreiter | @HassanZahirnia | @hsyq | @LeSuisse | @luciorubeens | @lvjiaxuan | @meteorlxy | @nhedger | @sibbng | @YunYouJun | @zojize

    View changes on GitHub

v8.6.0 by github-actions[bot]github-actions[bot]

Bug Fixes

  • nuxt: add useStorage to disabled composables (#1652) (1ed33ec)
  • useDraggable: should pass the stopPropagation option for component (#1620) (5e3151d)
  • useIntervalFn: unref interval (#1633) (29fc50c)

Features

v8.5.0 by github-actions[bot]github-actions[bot]

Bug Fixes

  • shared: correct to ignore undefined (#1601) (0aecfe6)
  • toRefs: keep class prototype, close #1530 (#1599) (356da7d)
  • useAxios: normalize isCanceled flag (#1585) (b833957)
  • useFetch: respect custom fetch option (#1603) (56eb358)
  • useFetch: return PromiseLike after setting method (#1571) (9b28628)
  • useFocus: focused should be false when element is undefined (#1580) (f0067ac)
  • useMediaQuery: normalize isSupported flag (#1575) (0222d48)
  • useUrlSearchParams: should return initialValue (#1583) (fe58f8a)
  • useVModel: unified value (#1568) (70d8092)
  • watchThrottled: duplicate callback invokation when leading and trailing edges coincide (#1593) (8ba3b9d)

Features

v8.4.2 by github-actions[bot]github-actions[bot]

Bug Fixes

  • useScrollLock: lock on element instead of document (#1561) (847e12f)
  • useScrollLock: stop listener properly (#1562) (f31de43)
  • useVModel: defaultValue can work with null (#1565) (f4e882c)
  • useVModel: return default value when it's nil only (#1567) (50d8a4c)

v8.4.1 by github-actions[bot]github-actions[bot]

Bug Fixes

  • useVModel: returning undefined on false values (#1557) (0f3ddca)

v8.4.0 by github-actions[bot]github-actions[bot]

Bug Fixes

  • computedAsync: keep evaluating true for concurrent changes (#1555) (23549c3)
  • core: circular reference (#1553) (df9dd89)
  • integrations: mark change-case as an optional peer dependacy (#1542) (aa6e593)
  • onClickOutside: fallback to pointerup event if click event not propagate (#1522) (89c9e53)
  • onLongPress: make directive work normal (#1550) (53ba3ba)
  • useAsyncState: isLoading not reset (#1518) (a8fd617)
  • useAxios: exception when args incorrect (#1534) (81f355d)
  • useAxios: rename aborted to isAborted (#1519) (e2a9ac3)
  • useElementBounding: call update on mounted (#626) (#1541) (dccd1f3)
  • useMutationObserver: isSupported misjudge (#1540) (a4238a8)

Features

  • rxjs: Correct useObservable type signature and provide means of creating a non-undefined Ref (#1551) (5f3d026)
  • useCurrentElement: new function (e24db79)
  • useNetwork: new onlineAt attribute (#1535) (4d5cf1c)
  • useScreenOrientation: new function (#1526) (e8c057c)
  • useToggle: new options (#1523) (7aaebb3)
  • useVModel: add option to define defaultValue (#1537) (66e82ec)

v8.3.1 by github-actions[bot]github-actions[bot]

Bug Fixes

  • nuxt: transpile ssr plugin (dfcee11)

Features

v8.3.0 by github-actions[bot]github-actions[bot]

Bug Fixes

Features

v8.2.6 by github-actions[bot]github-actions[bot]

Bug Fixes

  • nuxt: disable useHead and useTitle (903a14c)
  • useNProgress: allow partial options (#1487) (14ae0c9)
  • useRouteQuery: unset route query on default value (#1490) (c1459ed)

Features

v8.2.5 by github-actions[bot]github-actions[bot]

Bug Fixes

v8.2.4 by github-actions[bot]github-actions[bot]

Bug Fixes

Features

  • useElementBounding: new options (de05a18)

v8.2.3 by github-actions[bot]github-actions[bot]

Bug Fixes

  • nuxt: disable auto import from [@vueuse](https://github.com/vueuse)/integrations (dfac157)

v8.2.2 by github-actions[bot]github-actions[bot]

Bug Fixes

Features

v8.2.1 by github-actions[bot]github-actions[bot]

Bug Fixes

  • useAxios: reuse url when only AxiosRequestConfig is passed to execute (#1438) (788a7ff)
  • useKeyModifier: getModifierState is not a function (#1441) (946f6bc)
  • useMediaQuery: media query before mount (#1461) (7edd0c6)

Features

v8.2.0 by github-actions[bot]github-actions[bot]

Bug Fixes

Features

  • createInjectionState: init createInjectionState (#1456) (d98c4d8)

v8.1.2 by github-actions[bot]github-actions[bot]

Bug Fixes

  • metadata: unexported note entry (2f8ca30)

Features

  • useWebSocket: allow to pass predicate function to autoReconnect… (#1433) (e3de556)

v8.1.1 by github-actions[bot]github-actions[bot]

Bug Fixes

  • useStroage: synced timing (27d1ba2)

v8.1.0 by github-actions[bot]github-actions[bot]

Bug Fixes

  • useEventListener: support component target (#1408) (981c651)
  • useStorage sync race condition, closes #808 (#1430) (1ee0ae0)
  • onKeyStroke: make directive only registered once (#1410) (da440ab)
  • unrefElement: improve types (#1409) (3e19431)
  • useElementHover: make directive only registered once (#1412) (db4f7a2)
  • useElementSize: make directive only registered once (#1414) (bc1bd48)
  • useElementVisibility: directive should work fine (#1424) (be803af)
  • useInfiniteScroll: make directive only registered once (#1413) (554a17e)
  • useIntersectionObserver: make directive only registered once (#1411) (fb71532)
  • useScroll: make directive only registered once (#1415) (efc6cc5)

Features

v8.0.1 by github-actions[bot]github-actions[bot]

Bug Fixes

  • useFetch: make helper methods return PromiseLike<UseFetchReturn<T>> (#1402) (b9e8e8a)
  • useMediaQuery: removeEventListener in guard target should be med… (#1401) (92cedd1)

v8.0.0 by github-actions[bot]github-actions[bot]

Breaking Changes

  • Deprecated usage of @vueuse/core/nuxt has been removed, use @vueuse/nuxt instead
  • syncRef renamed to syncRefs (5ec1da1)
  • biSyncRef renamed to syncRef, with configurable syncing direction (360833d)
  • fix(useTextSelection)!: listen to selectionchange event by @okxiaoliang4 in #1194
  • refactor(useFocus)!: made target an required argument instead of an option by @wtykirby in #1010

Bug Fixes

  • useAxios: args param need limit (#1343) (42fc7a7)
  • useFetch: uppercase HTTP methods in useFetch (#1336) (4ce7c72)
  • useTextSelection: ssr compactible (2a87733)
  • onClickOutside: should work normal w/ directive (#1366) (66cefd5)

New Features

  • New @vueuse/metadata package to replace the indexes.json with proper types
  • Better support of related functions in docs
  • Support alias of functions
  • New functions
  • Enhancements
  • Directive support for functions

Refactoring

  • Normalize the function names with the backward compact alias
    • eagerComputed -> computedEager
    • asyncComputed -> computedAsync
    • controlledComputed -> computedWithControl
    • useThrottle, throttledRef -> refThrottled
    • useDebounce, debouncedRef -> refDebounced
    • controlledRef -> refWithControl
    • pasuableWatch -> watchPasuable
    • ignorableWatch -> watchIgnorable
    • debouncedWatch -> watchDebounced
    • throttledWatch -> watchThrottled
    • and, or, not -> logicAnd, logicOr, logicNot
    • autoResetRef -> refAutoReset

New Contributors

New Team Members

Full Changelog: https://github.com/vueuse/vueuse/compare/v7.7.1...v8.0.0

v8.0.0-beta.3 by github-actions[bot]github-actions[bot]

Bug Fixes

  • onClickOutside: should work normal w/ directive (#1366) (66cefd5)

Features

v8.0.0-beta.2 by github-actions[bot]github-actions[bot]

v8.0.0-beta.1 by github-actions[bot]github-actions[bot]

Breaking Changes

  • Deprecated usage of @vueuse/core/nuxt has been removed, use @vueuse/nuxt instead
  • syncRef renamed to syncRefs (5ec1da1)
  • biSyncRef renamed to syncRef, with configurable syncing direction (360833d)
  • fix(useTextSelection)!: listen to selectionchange event by @okxiaoliang4 in #1194
  • refactor(useFocus)!: made target an required argument instead of an option by @wtykirby in #1010

Bug Fixes

New Features

  • New @vueuse/metadata package to replace the indexes.json with proper types
  • Better support of related functions in docs
  • Support alias of functions
  • New functions
  • Enhancements
  • Directive support for functions

Refactoring

  • Normalize the function names with the backward compact alias
    • eagerComputed -> computedEager
    • asyncComputed -> computedAsync
    • controlledComputed -> computedWithControl
    • useThrottle, throttledRef -> refThrottled
    • useDebounce, debouncedRef -> refDebounced
    • controlledRef -> refWithControl
    • pasuableWatch -> watchPasuable
    • ignorableWatch -> watchIgnorable
    • debouncedWatch -> watchDebounced
    • throttledWatch -> watchThrottled
    • and, or, not -> logicAnd, logicOr, logicNot
    • autoResetRef -> refAutoReset

v7.7.1 by github-actions[bot]github-actions[bot]

Bug Fixes

v7.7.0 by github-actions[bot]github-actions[bot]

Bug Fixes

Features

v7.6.2 by github-actions[bot]github-actions[bot]

Bug Fixes

  • useElementBouding: should reset value while element unmounted (#1253) (aba020f)
  • useElementSize: should reset value while element unmounted (#1254) (7b40091)
  • useFps,useMemory: ssr support (#1244) (0e1e211)
  • useMagicKeys: filter undefined event key (#1235) (03929c7)
  • useToggle: toggle function return value (#1256) (8d190ae)

Features

v7.6.1 by github-actions[bot]github-actions[bot]

Bug Fixes

v7.6.0 by github-actions[bot]github-actions[bot]

Bug Fixes

Features

v7.5.5 by github-actions[bot]github-actions[bot]

Bug Fixes

Features

  • useAxios: added option to control whether the request fires immediately (#1170) (467522d)
  • useStyleTag: new function (#1154) (0a696d4)

v7.5.4 by github-actions[bot]github-actions[bot]

Bug Fixes

  • ssr-handlers: compatible with QQ browser (#1133) (7dac4f8)
  • types: do not use ShallowRef, close #1151 (3c38434)
  • useDraggable: onEnd() runs even if target wasn't dragged directly in exact mode (#1145) (4879255)
  • useWebSocket: close WebSocket (#1137) (f6b5994)
  • useWebWorkerFn: fix multiple dependencies handling (#1138) (e6968fb)

v7.5.3 by github-actions[bot]github-actions[bot]

Bug Fixes

v7.5.2 by github-actions[bot]github-actions[bot]

Bug Fixes

  • useBroadcastChannel: fix demo (90c2593)

Features

v7.5.1 by github-actions[bot]github-actions[bot]

Bug Fixes

v7.5.0 by github-actions[bot]github-actions[bot]

Bug Fixes

Features

v7.4.3 by github-actions[bot]github-actions[bot]

{
  "message": "You should use slots with <ContentRenderer>",
  "value": {
    "name": "v7.4.3",
    "tag_name": "v7.4.3",
    "date": "2021-12-30T10:17:16Z",
    "body": {
      "type": "root",
      "children": [],
      "toc": {
        "title": "",
        "searchDepth": 2,
        "depth": 2,
        "links": []
      }
    },
    "v": 7,
    "url": "https://github.com/vueuse/vueuse/releases/tag/v7.4.3",
    "tarball": "https://api.github.com/repos/vueuse/vueuse/tarball/v7.4.3",
    "zipball": "https://api.github.com/repos/vueuse/vueuse/zipball/v7.4.3",
    "prerelease": false,
    "author": {
      "name": "github-actions[bot]",
      "url": "https://github.com/apps/github-actions",
      "avatar": "https://avatars.githubusercontent.com/in/15368?v=4"
    },
    "_empty": true,
    "title": "",
    "description": "",
    "_type": "markdown",
    "_id": "github:v7.4.3.md"
  },
  "excerpt": false,
  "tag": "div"
}

v7.4.2 by github-actions[bot]github-actions[bot]

Bug Fixes

  • nuxt: cookies as storage should not expire (762a043)

v7.4.1 by github-actions[bot]github-actions[bot]

Features

v7.4.0 by github-actions[bot]github-actions[bot]

Bug Fixes

Features

v7.3.0 by github-actions[bot]github-actions[bot]

Bug Fixes

  • useScrollLock: set the overflow property on iOS device as well (#1033) (1cae15d)
  • useWebSocket: close WebSocket gently (#1018) (4b296c7)

Features

v7.2.2 by github-actions[bot]github-actions[bot]

Bug Fixes

v7.2.1 by github-actions[bot]github-actions[bot]

Bug Fixes

v7.2.0 by github-actions[bot]github-actions[bot]

Bug Fixes

Features

v7.1.2 by github-actions[bot]github-actions[bot]

Bug Fixes

  • useAsyncState: optional argument of execute (#972) (6661a09)
  • UseVirtualList: fix list not being reactive in component (#968) (fb7cd78)

Features

  • useEyeDropper: add initialValue option, improve types (#950) (cf8ced3)

v7.1.1 by github-actions[bot]github-actions[bot]

Bug Fixes

v7.1.0 by github-actions[bot]github-actions[bot]

Bug Fixes

  • nuxt: add useCookie in disabled composables for Nuxt (#965) (4088dad)

Features

v7.0.3 by github-actions[bot]github-actions[bot]

Bug Fixes

v7.0.2 by github-actions[bot]github-actions[bot]

Bug Fixes

  • nuxt: provide mjs version for nuxt module (bf80643)
  • useWindowSize: improve SSR (42ae437)

Features

  • useMediaQuery: improve SSR (7b67da6)

v7.0.1 by github-actions[bot]github-actions[bot]

Bug Fixes

  • useBase64: improve SSR compatibility (6bc5f04)
  • useEyeDropper: improve SSR compatibility (9b5f2c4)
  • useFocuseTrap: types import path (8e0f424)

Features

v7.0.0 by github-actions[bot]github-actions[bot]

BREAKING CHANGES

  • refactor(onClickOutside)!: listen click event, remove event option (#817)
  • fix(useGeolocation)!: latitude and longitude default to Infinity (#839)
  • fix(useElementBounding)!: use getBoundingClientRect instead of contentRect (#870)
  • fix(useClipboard)!: disable read by default (#941)

v6.9.2 by github-actions[bot]github-actions[bot]

Bug Fixes

Features

v6.9.1 by github-actions[bot]github-actions[bot]

Bug Fixes

  • nuxt: opt-out vite optimization (2b11461)

v6.9.0 by github-actions[bot]github-actions[bot]

Features

v10.2.1 by github-actions[bot]github-actions[bot]

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v10.2.0 by antfuantfu

   🚀 Features

   🐞 Bug Fixes

   🏎 Performance

    View changes on GitHub

v10.1.0 by github-actions[bot]github-actions[bot]

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v10.0.2 by github-actions[bot]github-actions[bot]

v10.0.1 by github-actions[bot]github-actions[bot]

   🐞 Bug Fixes

    View changes on GitHub

v10.0.0 by github-actions[bot]github-actions[bot]

VueUse v10

   ✨ Highlights

   🚨 Breaking Changes

   🚀 Features

   🐞 Bug Fixes

   🏎 Performance

    View changes on GitHub

v10.0.0-beta.5 by github-actions[bot]github-actions[bot]

   🚨 Breaking Changes

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v10.0.0-beta.4 by github-actions[bot]github-actions[bot]

   🚨 Breaking Changes

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v10.0.0-beta.3 by github-actions[bot]github-actions[bot]

   🚨 Breaking Changes

   🚀 Features

   🐞 Bug Fixes

   🏎 Performance

    View changes on GitHub

v10.0.0-beta.2 by github-actions[bot]github-actions[bot]

   🚨 Breaking Changes

  • useElementVisibility: Use useIntersectionObserver instead of scroll event handler  -  by @curtgrimes in #2551 (74b00)

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v10.0.0-beta.1 by github-actions[bot]github-actions[bot]

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v10.0.0-beta.0 by github-actions[bot]github-actions[bot]

   🚨 Breaking Changes

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub