vueuse
Go to documentationCollection of essential Vue Composition Utilities for Vue 2 and 3
v9.13.0 by
github-actions[bot]
🚀 Features
- useArrayFindLast: New function - by @huynl-96 in #2471 (b0ac4)
- useAsyncState: Get a promise function parameter type declaration - by @Brain777777 in #2765 (b4c63)
- useAxios: Add success and error callbacks - by @Alfred-Skyblue in #2714 (809fc)
- useClamp: Composable computed usage improvements - by @ClemDee and @antfu in #2696 (08a07)
- useElementHover: Give hook delay properties - by @LockingReal and @antfu in #2741 (23283)
- useEventListener: Support reactive options - by @antfu (103d6)
- useFetch: Cancel previous request on refetch - by @Alfred-Skyblue and 丶远方 in #2750 (cd9d6)
- useInterval: Add
reset
function - by @mohammadhosry and Mohammad Agbareya in #2686 (81db6) - useMutationObserver: Added test cases - by @Alfred-Skyblue in #2734 (192c8)
- useScroll: Support scrollend event - by @kongmoumou in #2716 (f8872)
- useSpeechSynthesis: Add
stop
function - by @zwkkwz1 in #2774 (820e2)
🐞 Bug Fixes
- useAsyncValidator: Fix Schema importing from async-validator - by @theruziev and @okxiaoliang4 in #2761 (dbcdb)
- useAxios: Fix cancelToken - by @Alfred-Skyblue and 丶远方 in #2728 (7ad51)
- useDevicePixelRatio: Remove unnecessary cleanup - by @Waleed-KH and @antfu in #2325 (83feb)
- useFetch: Check if it's object for
isFetchOptions
- by @antfu (c2bc6) - useFocus: Listen
focus
andblur
to thetargetElement
- by @okxiaoliang4 in #2631 (7cd88) - useInterval: Fix types - by @antfu (db66c)
- useScrollLock: Detect parent with overflow auto - by @dpschen in #2699 (7e590)
- useStorage: Emit a custom event to support custom storage areas - by @43081j and @okxiaoliang4 in #2630 (c6185)
- useStorageAsync: Handle mergeDefaults option - by @ModyQyW in #2773 (105f4)
- useThrottleFn: Check negative timeout - by @vaakian in #2620 (a7238)
- useWindowScroll: Use
scrollX
instead ofpageXOffset
- by @okxiaoliang4 in #2776 (e490a)
View changes on GitHub
v9.12.0 by
github-actions[bot]
🚀 Features
- usePrevious: New function - by @antfu (e101f)
- useRafFn, useIntervalFn, useTimeoutFn: Make status readonly - by @rotu in #2685 (39183)
- useWebSocket: Allow undefined ref for url - by @ferferga in #2473 (13924)
🐞 Bug Fixes
- useElementSize: Use contentBoxSize as an array in useElementSize - by @threedayAAAAA and vaakian X in #2520 (30475)
- useElementSize: Fix incorrect element size on SVG - by @Lionad-Morotar, @wheatjs and @antfu in #2661 (902b3)
- useMediaControls: Ended status not updating - by @ferferga in #2680 (4ef27)
- useMouseInElement: Check if mouse out of window - by @chaii3 and @antfu in #2458 (54f4e)
- usePrecision: Fix return type - by @ClemDee in #2676 (e331b)
- useTimeoutFn: Respect callback parameters in start function - by @wvffle in #2693 (e054a)
View changes on GitHub
v9.11.1 by
github-actions[bot]
v9.11.0 by
github-actions[bot]
🚀 Features
- computedAsync: Introduce
shadow
option - by @xiankaiqun in #2616 (a0656) - createInjectionState: Return state when providing injection state - by @Tanimodori and lsdsjy in #2309 (f7ce6)
- reactivePick: Add test cases - by @Alfred-Skyblue, 丶远方 and @wheatjs in #2653 (b06b8)
- useAsyncState: Add test cases - by @Alfred-Skyblue and @wheatjs in #2657 (5907f)
- usePointerLock: New function - by @daniser, Sergey Danilchenko, Jelf and @wheatjs in #2590 (ae69f)
- useThrottleFn: Add test cases - by @Alfred-Skyblue in #2649 (85ab1)
🐞 Bug Fixes
- Nuxt3 implementation - by @roiLeo in #2644 (8f6ce)
- components: Mark
defineComponent
as pure - by @vaakian and @wheatjs in #2623 (d5321) - docs: Remove unnecessary import - by @yuyinws in #2611 (7a2ff)
- useAxios: Assign AxiosError to error.value when no url provided - by @syy11cn and @wheatjs in #2478 and #2484 (1e270)
- useDraggable: Write to useStorage - by @akifo in #2575 (e39c2)
- useElementByPoint: Make document configurable - by @vaakian in #2614 (c3639)
- useRouteQuery: Allow setting multiple route queries in same tick - by @wheatjs in #2646 (07c95)
- useVirtualList: List sometimes missing elements - by @begedin and @wheatjs in #2477 (25f6e)
View changes on GitHub
v9.10.0 by
github-actions[bot]
🚀 Features
- useActiveElement: Support shadow roots - by @43081j and @antfu in #2592 (07f20)
- useArrayUnique: New function - by @Alfred-Skyblue in #2597 (162cd)
- useDebounceFn,useThrottleFn: Return result using promise - by @vaakian in #2580 (4d305)
- useMouse: Support for movement detection - by @daniser and Sergey Danilchenko in #2589 (0c39d)
- useVirutalList: Expose
scrollTo
in component - by @Agapanthus and Eric Skaliks in #2397 (9f495)
🐞 Bug Fixes
- nuxt: Disable useImage in the Nuxt package for auto imports - by @wheatjs in #2602 (d3d1d)
- onKeyStroke: Make
target
ref nullable - by @vaakian in #2579 (28614) - useActiveElement: Ignore if relatedTarget is set - by @dpschen in #2600 (ae78d)
- useElementBounding: Update on scroll - by @Ducz01 and sibbng in #2596 (268a6)
- useScrollLock: Fix iOS touchmove bug - by @robinscholz, Robin Scholz, webfansplz and @antfu in #2362 (c9a9a)
View changes on GitHub
v9.9.0 by
github-actions[bot]
🚀 Features
- useAsyncState: Add onSuccess callbacks - by @Alfred-Skyblue in #2562 (ed64f)
🐞 Bug Fixes
- formatTimeAgo: Typo
foramtTimeAgo
->formatTimeAgo
- by @QGIsK in #2568 (bb0fd) - useFetch: Doesn't work with formData payload - by @abitwhy in #2440 (000fd)
View changes on GitHub
v9.8.2 by
github-actions[bot]
v9.8.1 by
github-actions[bot]
v9.8.0 by
github-actions[bot]
🚀 Features
- extendRef: Support 2.7, close #2340 - by @antfu in #2340 (8c82e)
- onClickOutside: Allow selector strings for ignore list - by @sibbng and @antfu in #2439 (7b3db)
- useTimeAgo: Non-reactive version
formatTimeAgo
- by @antfu (9293c)
🐞 Bug Fixes
- onClickOutside: Apply ignore list on keyboard clicks - by @sibbng in #2438 (12e21)
- useTimeAgo: Rounding unit fallback - by @antfu (f40a0)
View changes on GitHub
v9.7.0 by
github-actions[bot]
🚀 Features
- createEeventHook: Auto dispose - by @ARZarkesh and @antfu in #2518 (fdd4d)
- useBreakpoints: Add breakpoints for Master CSS - by @imsus in #2529 (30c5b)
- useRafFn: Add
delta
andtimestamp
- by @innocenzi in #2493 (692d0) - useTimeAgo: Add
floor
andceil
value calculation - by @userquin and @antfu in #2543 (a7dc6) - useTimeAgo: Custom units, number rounding - by @antfu (324de)
🐞 Bug Fixes
- Reference - by @antfu (ea497)
- useActiveElement: Ignore blur for relatedTarget - by @dpschen in #2540 (88b44)
- useDraggable: Use
clientX
instead ofpageX
, close #2053 - by @stefnotch in #2054 and #2053 (c9186) - useGeolocation: Implement immediate option - by @ebisbe in #2472 (161fd)
- useIntervalFn: Watch computed refs instead of just refs - by @innocenzi in #2539 (8bb7b)
- useMagicKeys: Also clear 'current' on @focus - by @hartmut (@blur)
- useStyleTag: Allow multiline CSS - by @jameswragg in #2476 (cfcc2)
- useTextareaAutosize: Support changes of element width - by @dpschen in #2541 (ebd48)
- useTimeAgo: Add
showSecond
prop to component - by @CS-Birb in #2547 (0c333) - useWindowScroll: Use configured window onScroll - by @94726 in #2545 (5df0a)
View changes on GitHub
v9.6.0 by
github-actions[bot]
🐞 Bug Fixes
- onClickOutside: Call handler if
click
event is fired by a keypress - by @sibbng in #2426 (ff96d) - ssr-plugin: Use useHead instead of useMeta - by @daniil4udo in #2449 (01c28)
- useFirestore: Fix falsy type error - by @kiyopikko in #2431 (6886e)
- useIDBKeyval: Incorrect value init set - by @sun0day in #2416 (1d841)
- useStyleTag: Allow use of existing node - by @jameswragg in #2442 (94413)
- useTransition: Call pause() to stop useRafFn when disabling - by @huodoushigemi, 李众豪 and @antfu in #2360 (0a49e)
View changes on GitHub
v9.5.0 by
github-actions[bot]
🚀 Features
- onClickOutside: Support options in component - by @fiadone and @sibbng in #2391
- useEventListener: Accept multiple
events
orlisteners
- 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]
🚀 Features
- refDebounced: Use MaybeComputedRef for ms - by @dominikklein in #2337
- useClipboard: Support legacy copy - by @lumdzeehol in #2336
- useVirtualList: Horizontal list - by @Surof1n in #2310
- useWebWorker: Support overloads - by @GODLiangCY in #2259
🐞 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]
🚀 Features
- fromEvent: Support HTMLElement - by @rorry121 and @antfu in #2048
- useAxios: Add R genericity type for custom response data - by @jahnli in #2304
- useFocusTrap: Enable options in component - by @azaleta in #2321
- useSorted: New function - by @okxiaoliang4 in #1799
🐞 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
andtitleTemplate
been specified at the same time - by @huynl-96 and @antfu in #2049
View changes on GitHub
v9.3.0 by
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
- onClickOutside: Put ignore logic on
pointerdown
event - by @GODLiangCY in #2198 - templateRef: Add Component type - by @Holi0317 in #2203
- until:
.not
returns new instance - by @lsdsjy and @antfu in #2224
View changes on GitHub
v9.2.0 by
github-actions[bot]
🚨 Breaking Changes
- Bump Nuxt support to RC.9, update
autoImports:sources
hook - by @DamianGlowala in #2166
🚀 Features
- useAxios: Support RequestConfig for
execute
- by @azaleta in #2152 - useBreakpoints: Support
greaterOrEqual
etc. - by @azaleta in #2148 - useCloned: New function - by @chaii3 and @antfu in #2045
- useDraggable: Support customizing
trigger
element - by @imguolao in #2133 - useElementSize: Support
box
sizing - by @vaakian and @antfu in #2143 - useElementVisibility: Support watch the real element - by @sxzz in #2169
- useUrlSearchParams: Add
write
option - by @waldonUB in #2165 - useVModel: Support
clone
option - by @edumudu and @antfu in #2022 - useWebSocket: Enhence heartbeat - by @azaleta in #2170
- useWindowSize: Support
includeScrollbar
- by @vaakian in #2161
🐞 Bug Fixes
- useArrayMap: Allow return type matches the mapper function - by @GODLiangCY in #2172
- useAxios: Reset error on
execute
- by @flyingTodream in #2095 - useDevicePixelRatio: More efficient mechanism - by @Waleed-KH and @antfu in #2044
- useFavicon: Improve type overload - by @azaleta in #2123
- useFileDialog: Choose file not work on mobile - by @1SZX1 and @antfu in #2080
- useFocusWithin: Change focused typing to ComputedRef - by @chaii3 in #2073
- useMemoize: Allow number in
getKey
- by @chaii3 in #2074
View changes on GitHub
v9.1.1 by
github-actions[bot]
🚀 Features
- usePreferredContrast: New function - by @Zhaocl1997 in #2040
🐞 Bug Fixes
- firebase: Improve externalization - by @antfu (e2a78)
- shared: Resolve internal circular reference - by @antfu (0fdbb)
- useActiveElement: Use
computedWithControl
instead ofcounter
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]
🚀 Features
- useCycleList: Support MaybeRef for initialValue - by @Waleed-KH in #2025
- usePrecision: New function - by @antfu (49c8a)
- usePreferredReducedMotion: New function - by @Zhaocl1997 in #2039
- useToNumber: New function - by @antfu (f69a3)
- useToString: New function - by @antfu (2b869)
🐞 Bug Fixes
- Improve
MaybeComputedRef
- by @antfu (28c5a) - useFavicon: Writable return type - by @chaii3 and @antfu in #2036
- useOffsetPagination: Min value for pageCount should be 1 - by @jd-solanki and @antfu in #2001
- useScriptTag: Normalize
src
arg - by @huynl-96 in #2030 - useToFixed: Deprecated in favor of
usePrecision
- by @antfu (790ef) - useTransition: Improve type of
TransitionPresets
- by @antfu (cc865)
View changes on GitHub
v9.0.2 by
github-actions[bot]
v9.0.1 by
github-actions[bot]
🚀 Features
- useDateFormat: Support dd, ddd and dddd formatter - by @aki77 in #1986
- useFirestore: Support reactive query - by @kiyopikko in #2008
- useToFixed: New function - by @FliPPeDround in #2003
🐞 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]
🚨 Breaking Changes
- all:
isSupported
becomesRef<boolean>
instead ofboolean
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
toUseSpeechSynthesisStatus
- by @antfu (db61f) - onKeyStroke: Rename type
KeyStrokeOptions
toOnKeyStrokeOptions
- by @okxiaoliang4 in #1807 - useAsyncState: Rename type
AsyncStateOptions
toUseAsyncStateOptions
- by @okxiaoliang4 in #1809 - useClipboard: Rename type
ClipboardOptions
toUseClipboardOptions
andClipboardReturn
toUseClipboardReturn
- by @okxiaoliang4 in #1861 - useElementVisibility: Rename type
VisibilityScrollTargetOptions
toUseElementVisibilityOptions
- by @okxiaoliang4 in #1863 - useEventSource: Return type should be
UseEventSourceReturn
- by @okxiaoliang4 in #1864 - useFavicon: Rename type
FaviconOptions
toUseFaviconOptions
- by @okxiaoliang4 in #1865 - useFocusWithin: Rename type
FocusWithinReturn
toUseFocusWithinReturn
- by @okxiaoliang4 in #1866 - useGeolocation: Rename type
GeolocationOptions
toUseGeolocationOptions
- by @okxiaoliang4 in #1868 - useIdle: Rename type
IdleOptions
toUseIdleOptions
- by @okxiaoliang4 in #1869 - useIntersectionObserver: Rename type
IntersectionObserverOptions
toUseIntersectionObserverOptions
- by @okxiaoliang4 in #1870 - useJwt: Rename type
JwtOptions
toUseJwtOptions
andJwtResult
toUseJwtReturn
- by @okxiaoliang4 in #1899 - useKeyModifier: Rename type
ModifierOptions
toUseModifierOptions
- by @okxiaoliang4 in #1871 - useMagicKeys: Rename type
MagicKeys
toUseMagicKeysReturn
- by @okxiaoliang4 in #1873 - useMemoize: Rename type
UseMemoizedFn
toUseMemoizeReturn
and new typeUseMemoizeOptions
- by @okxiaoliang4 in #1872 - useMemory: Rename type
MemoryOptions
toUseMemoryOptions
- by @okxiaoliang4 in #1605 - useMouse: Rename type
MouseOptions
toUseMouseOptions
- by @okxiaoliang4 in #1877 - useMutationObserver: Rename type
MutationObserverOptions
toUseMutationObserverOptions
- by @okxiaoliang4 in #1884 - useParallax: Rename type
ParallaxOptions
toUseParallaxOptions
andParallaxReturn
toUseParallaxReturn
- by @okxiaoliang4 in #1885 - usePointerSwipe: Rename type
PointerSwipeOptions
toUsePointerSwipeOptions
andPointerSwipeReturn
toUsePointerSwipeReturn
- by @okxiaoliang4 in #1886 - useRTDB: Rename type
RTDBOptions
toUseRTDBOptions
- by @okxiaoliang4 in #1901 - useRafFn: Rename type
RafFnOptions
toUseRafFnOptions
- by @okxiaoliang4 in #1887 - useResizeObserver: Rename type
ResizeObserverOptions
toUseResizeObserverOptions
- by @okxiaoliang4 in #1862 - useShare: Rename type
ShareOptions
toUseShareOptions
- by @okxiaoliang4 in #1888 - useSpeechRecognition: Rename type
SpeechRecognitionOptions
toUseSpeechRecognitionOptions
- by @okxiaoliang4 in #1889 - useSpeechSynthesis: Rename type
SpeechSynthesisOptions
toUseSpeechSynthesisOptions
- by @okxiaoliang4 in #1890 - useSpeechSynthesis: Remove
voiceInfo
, allowvoice
as ref - by @sibbng in #1882 - useStorage: Rename type
StorageOptions
toUseStorageOptions
- by @okxiaoliang4 in #1867 - useStorageAsync: Rename type
StorageAsyncOptions
toUseStorageAsyncOptions
- by @okxiaoliang4 in #1883 - useSwipe: Rename type
SwipeOptions
toUseSwipeOptions
andSwipeReturn
toUseSwipeReturn
- by @okxiaoliang4 in #1891 - useTimestamp: Rename type
TimestampOptions
toUseTimestampOptions
- by @okxiaoliang4 in #1892 - useTransition: Rename type
TransitionOptions
toUseTransitionOptions
- by @okxiaoliang4 in #1893 - useVModel: Rename type
VModelOptions
toUseVModelOptions
- by @okxiaoliang4 in #1894 - useWebSocket: Rename type
WebSocketOptions
toUseWebSocketOptions
andWebSocketResult
toUseWebSocketReturn
- by @okxiaoliang4 in #1895 - useWebWorkerFn: Rename type
WebWorkerOptions
toUseWebWorkerOptions
- by @okxiaoliang4 in #1896 - useWindowSize: Rename type
WindowSizeOptions
toUseWindowSizeOptions
- by @okxiaoliang4 in #1897 - useInterval: Rename type
IntervalOptions
toUseIntervalOptions
- by @okxiaoliang4 in #1945 - useIntervalFn: Rename type
IntervalFnOptions
toUseIntervalFnOptions
- by @okxiaoliang4 in #1943 - useTimeoutFn,useTimeout: Rename type
TimeoutOptions
toUseTimeoutOptions
andTimeoutFnOptions
toUseTimeoutFnOptions
- by @okxiaoliang4 in #1944
- useSpeechSynthesis: Rename type
- 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 befalse
by default - by @webfansplz and @antfu in #1687 - useMagicKeys: Store
key
instead ofkeyCode
incurrent
- 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 tocomputed
or the watch source ofwatch
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- useAbs: New function - by @LittleSound and @antfu in #1825
- useCeil: New function - by @webfansplz in #1818
- useFloor: New function - by @webfansplz in #1817
- useMath: New function - by @antfu in #1935
- useMax: New function - by @FrankFang and @antfu in #1829
- useMin: New function - by @antfu in #1934
- useRound: New function - by @webfansplz in #1820
- useSum: New function - by @holazz in #1837
- useTrunc: New function - by @hanpei and @antfu in #1838
- useAverage: New function - by @colgin and @antfu in #1826
- New Array-related utilities
- useArrayEvery: New function - by @huynl-96 in #1915
- useArrayFilter: New function - by @huynl-96 in #1905
- useArrayFind: New function - by @yjl9903 and @antfu in #1875
- useArrayJoin: New function - by @huynl-96 in #1904
- useArrayMap: New function - by @huynl-96 and @antfu in #1908
- useArrayReduce: New function - by @yjl9903 and @antfu in #1919
- useArraySome: New function - by @huynl-96 in #1916
- useArrayFindIndex: New function - by @huynl-96 in #1973
- 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]
🚨 Breaking Changes
🚀 Features
- syncRef: Support custom transforms - by @chaii3 and @antfu in #1968
- useArrayFindIndex: New function - by @huynl-96 in #1973
- 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
View changes on GitHub
v9.0.0-beta.1 by
github-actions[bot]
🚨 Breaking Changes
- useInterval: Rename type
IntervalOptions
toUseIntervalOptions
- by @okxiaoliang4 in #1945 - useIntervalFn: Rename type
IntervalFnOptions
toUseIntervalFnOptions
- by @okxiaoliang4 in #1943 - useTimeoutFn,useTimeout: Rename type
TimeoutOptions
toUseTimeoutOptions
andTimeoutFnOptions
toUseTimeoutFnOptions
- 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]
🚨 Breaking Changes
- all:
isSupported
becomesRef<boolean>
instead ofboolean
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
toUseSpeechSynthesisStatus
- by @antfu (db61f) - onKeyStroke: Rename type
KeyStrokeOptions
toOnKeyStrokeOptions
- by @okxiaoliang4 in #1807 - useAsyncState: Rename type
AsyncStateOptions
toUseAsyncStateOptions
- by @okxiaoliang4 in #1809 - useClipboard: Rename type
ClipboardOptions
toUseClipboardOptions
andClipboardReturn
toUseClipboardReturn
- by @okxiaoliang4 in #1861 - useElementVisibility: Rename type
VisibilityScrollTargetOptions
toUseElementVisibilityOptions
- by @okxiaoliang4 in #1863 - useEventSource: Return type should be
UseEventSourceReturn
- by @okxiaoliang4 in #1864 - useFavicon: Rename type
FaviconOptions
toUseFaviconOptions
- by @okxiaoliang4 in #1865 - useFocusWithin: Rename type
FocusWithinReturn
toUseFocusWithinReturn
- by @okxiaoliang4 in #1866 - useGeolocation: Rename type
GeolocationOptions
toUseGeolocationOptions
- by @okxiaoliang4 in #1868 - useIdle: Rename type
IdleOptions
toUseIdleOptions
- by @okxiaoliang4 in #1869 - useIntersectionObserver: Rename type
IntersectionObserverOptions
toUseIntersectionObserverOptions
- by @okxiaoliang4 in #1870 - useJwt: Rename type
JwtOptions
toUseJwtOptions
andJwtResult
toUseJwtReturn
- by @okxiaoliang4 in #1899 - useKeyModifier: Rename type
ModifierOptions
toUseModifierOptions
- by @okxiaoliang4 in #1871 - useMagicKeys: Rename type
MagicKeys
toUseMagicKeysReturn
- by @okxiaoliang4 in #1873 - useMemoize: Rename type
UseMemoizedFn
toUseMemoizeReturn
and new typeUseMemoizeOptions
- by @okxiaoliang4 in #1872 - useMemory: Rename type
MemoryOptions
toUseMemoryOptions
- by @okxiaoliang4 in #1605 - useMouse: Rename type
MouseOptions
toUseMouseOptions
- by @okxiaoliang4 in #1877 - useMutationObserver: Rename type
MutationObserverOptions
toUseMutationObserverOptions
- by @okxiaoliang4 in #1884 - useParallax: Rename type
ParallaxOptions
toUseParallaxOptions
andParallaxReturn
toUseParallaxReturn
- by @okxiaoliang4 in #1885 - usePointerSwipe: Rename type
PointerSwipeOptions
toUsePointerSwipeOptions
andPointerSwipeReturn
toUsePointerSwipeReturn
- by @okxiaoliang4 in #1886 - useRTDB: Rename type
RTDBOptions
toUseRTDBOptions
- by @okxiaoliang4 in #1901 - useRafFn: Rename type
RafFnOptions
toUseRafFnOptions
- by @okxiaoliang4 in #1887 - useResizeObserver: Rename type
ResizeObserverOptions
toUseResizeObserverOptions
- by @okxiaoliang4 in #1862 - useShare: Rename type
ShareOptions
toUseShareOptions
- by @okxiaoliang4 in #1888 - useSpeechRecognition: Rename type
SpeechRecognitionOptions
toUseSpeechRecognitionOptions
- by @okxiaoliang4 in #1889 - useSpeechSynthesis: Rename type
SpeechSynthesisOptions
toUseSpeechSynthesisOptions
- by @okxiaoliang4 in #1890 - useSpeechSynthesis: Remove
voiceInfo
, allowvoice
as ref - by @sibbng in #1882 - useStorage: Rename type
StorageOptions
toUseStorageOptions
- by @okxiaoliang4 in #1867 - useStorageAsync: Rename type
StorageAsyncOptions
toUseStorageAsyncOptions
- by @okxiaoliang4 in #1883 - useSwipe: Rename type
SwipeOptions
toUseSwipeOptions
andSwipeReturn
toUseSwipeReturn
- by @okxiaoliang4 in #1891 - useTimestamp: Rename type
TimestampOptions
toUseTimestampOptions
- by @okxiaoliang4 in #1892 - useTransition: Rename type
TransitionOptions
toUseTransitionOptions
- by @okxiaoliang4 in #1893 - useVModel: Rename type
VModelOptions
toUseVModelOptions
- by @okxiaoliang4 in #1894 - useWebSocket: Rename type
WebSocketOptions
toUseWebSocketOptions
andWebSocketResult
toUseWebSocketReturn
- by @okxiaoliang4 in #1895 - useWebWorkerFn: Rename type
WebWorkerOptions
toUseWebWorkerOptions
- by @okxiaoliang4 in #1896 - useWindowSize: Rename type
WindowSizeOptions
toUseWindowSizeOptions
- by @okxiaoliang4 in #1897
- useSpeechSynthesis: Rename type
- 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 befalse
by default - by @webfansplz and @antfu in #1687 - useMagicKeys: Store
key
instead ofkeyCode
incurrent
- 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 tocomputed
or the watch source ofwatch
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- useAbs: New function - by @LittleSound and @antfu in #1825
- useCeil: New function - by @webfansplz in #1818
- useFloor: New function - by @webfansplz in #1817
- useMath: New function - by @antfu in #1935
- useMax: New function - by @FrankFang and @antfu in #1829
- useMin: New function - by @antfu in #1934
- useRound: New function - by @webfansplz in #1820
- useSum: New function - by @holazz in #1837
- useTrunc: New function - by @hanpei and @antfu in #1838
- useAverage: New function - by @colgin and @antfu in #1826
- New Array related utilities
- useArrayEvery: New function - by @huynl-96 in #1915
- useArrayFilter: New function - by @huynl-96 in #1905
- useArrayFind: New function - by @yjl9903 and @antfu in #1875
- useArrayJoin: New function - by @huynl-96 in #1904
- useArrayMap: New function - by @huynl-96 and @antfu in #1908
- useArrayReduce: New function - by @yjl9903 and @antfu in #1919
- useArraySome: New function - by @huynl-96 in #1916
View changes on GitHub
v8.9.4 by
github-actions[bot]
🐞 Bug Fixes
- useDropZone: Improve argument type - by @aki77 in #1933
- useFileDialog: Explict
UseFileDialogReturn
type - by @xiaoxiangmoe in #1927 - useInfiniteScroll: Add direction types - by @sand4rt in #1929
View changes on GitHub
v8.9.3 by
github-actions[bot]
🐞 Bug Fixes
- useStyleTag: Fix hydration mismatch issue - by @sibbng in #1918
- useVModel: Fix compact with 2.7, fix #1745 - by @Staremang in #1898
View changes on GitHub
v8.9.2 by
github-actions[bot]
🚀 Features
- onClickOutside: Add
detectIframe
option - by @sibbng in #1795 - useVModel: Compact with 2.7, fix #1745 - by @jiuran in #1798
🐞 Bug Fixes
- useMagicKeys: Fix setting properties of undefined value - by @Matrixbirds in #1856
View changes on GitHub
v8.9.1 by
github-actions[bot]
🐞 Bug Fixes
- useFileDialog: SSR compatible, close #1788 - by @antfu (58a45)
- useMagicKeys: Only clean up used keys, close #1793 - by @antfu (3c85d)
View changes on GitHub
v8.9.0 by
github-actions[bot]
🚀 Features
- useFileDialog: New function - by @wobsoriano, @antfu and @okxiaoliang4 in #1218
- useObjectUrl: New function - by @michaelhue in #1763
- useRouteParams: New function - by @DevilTea and @antfu in #1173
- useStepper: New function - by @innocenzi and @antfu in #1754
- useTextareaAutosize: New function - by @innocenzi and @antfu in #1756
- watchArray: New function - by @w1ndy and @antfu in #1705
🐞 Bug Fixes
- useColorMode: Resolve auto to preferred mode internally - by @dfreier in #1766
- useMagicKeys: Reset refs on target blur - by @lavolpecheprogramma and @antfu in #1755
View changes on GitHub
v8.8.1 by
github-actions[bot]
🚀 Features
🐞 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]
🚀 Features
- onLongPress: Added modifiers - by @chaii3 in #1719
- resolveRef: New function - by @antfu in #1743
- useAxios: Awaitable execute method - by @FRSgit in #1723
- useBase64: Accept objects - by @chaii3 and @antfu in #1706
- useColorMode: Add option to return
auto
mode - by @dfreier and @antfu in #1627 - useWindowSize: Listen to the
orientationchange
event - by @okxiaoliang4 and @antfu in #1609 - watchTriggerable: Extending
watch
with a manual trigger - by @LittleSound in #1736
🐞 Bug Fixes
- computedWithControl: Source type match vue.watch - by @kongmoumou in #1674
- reactivePick: Allow nested keys - by @antfu (80c16)
- types:
reactiveOmit
andreactivePick
support array as second arg - by @Brain777777 in #1742 - useCssVar: Remove spaces at both ends - by @murongg in #1741
- useDrauu: Fix Eraser does not work - by @qinwencheng and @antfu in #1753
- useMediaQuery: Strict
isSupported
check - by @antfu (5a64c)
View changes on GitHub
v8.7.5 by
github-actions[bot]
v8.7.4 by
github-actions[bot]
🚀 Features
🐞 Bug Fixes
- unrefElement:
- Revert
#1657
- Revert
❤️ Contributors
Thanks to @antfu | @carlosgamezdev | @michealroberts | @okxiaoliang4
View changes on GitHub
v8.7.3 by
github-actions[bot]
v8.7.2 by
github-actions[bot]
v8.7.1 by
github-actions[bot]
v8.7.0 by
github-actions[bot]
🚀 Features
🐞 Bug Fixes
- onClickOutside:
- Avoid calling safari workaround on right click
#1673
- Avoid calling safari workaround on right click
- unrefElement:
- Don't return the Vue instance when
$el
isnull
/undefined
#1657
- Don't return the Vue instance when
- useFetch:
- Ssr compactible for
headersToObject
8f541b0a
- Ssr compactible for
- useIntervalFn:
- Watch interval correctly
#1676
- Watch interval correctly
- useMagicKeys:
getModifierState
is not function error in Chrome#1654
- useScroll:
- Compatibility for mobile
#1663
- Compatibility for mobile
- useUrlSearchParams:
- Preserve history state when updating query
#1661
- Preserve history state when updating query
- watch*:
- Fix
T
type forWatchCallback
#1692
- Fix
❤️ 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]
v8.5.0 by
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 befalse
whenelement
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]
v8.4.1 by
github-actions[bot]
v8.4.0 by
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 ifclick
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
toisAborted
(#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]
v8.3.0 by
github-actions[bot]
Bug Fixes
- refAutoReset: clear timeout on scope dispose (#1507) (8843f8f)
- useDraggable: update type (0ef8f8f)
- useFetch: merge default options (#1500) (f62bf35), closes #1495
- useRafFn: call
cancelAnimationFrame
on pause (#1502) (a21bd2b) - useScriptTag: enable setting arbitrary attrs (#1511) (f8cd7a7)
Features
- nuxt: support nuxt3 rc (c6407e1)
v8.2.6 by
github-actions[bot]
v8.2.4 by
github-actions[bot]
v8.2.3 by
github-actions[bot]
v8.2.2 by
github-actions[bot]
v8.2.1 by
github-actions[bot]
v8.2.0 by
github-actions[bot]
v8.1.2 by
github-actions[bot]
v8.1.0 by
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]
v8.0.0 by
github-actions[bot]
Breaking Changes
- Deprecated usage of
@vueuse/core/nuxt
has been removed, use@vueuse/nuxt
instead syncRef
renamed tosyncRefs
(5ec1da1
)biSyncRef
renamed tosyncRef
, 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 theindexes.json
with proper types - Better support of related functions in docs
- Support alias of functions
- New functions
- Enhancements
- Directive support for functions
- onKeyStroke: directive support (#1362) (9f8eabb)
- useElementHover: directive support (#1359) (73b0def)
- useInfiniteScroll: directive support (#1340) (fd8ca8e)
- useIntersectionObserver: directive support (#1339) (53d4dfd)
- useScroll: directive support (#1348) (0daf86f)
- useScrollLock: directive support (#1360) (4356613)
- useElementSize: directive support (#1365) (1346456)
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
- @Glandos made their first contribution in #1336
- @WuLianN made their first contribution in #1343
- @hengshanMWC made their first contribution in #1363
- @Rolanddoda made their first contribution in #1380
- @Flamenco made their first contribution in #1384
- @dospunk made their first contribution in #1392
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]
v8.0.0-beta.2 by
github-actions[bot]
Full changelog at https://github.com/vueuse/vueuse/releases/tag/v8.0.0-beta.1
v8.0.0-beta.1 by
github-actions[bot]
Breaking Changes
- Deprecated usage of
@vueuse/core/nuxt
has been removed, use@vueuse/nuxt
instead syncRef
renamed tosyncRefs
(5ec1da1
)biSyncRef
renamed tosyncRef
, 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)
New Features
- New
@vueuse/metadata
package to replace theindexes.json
with proper types - Better support of related functions in docs
- Support alias of functions
- New functions
- Enhancements
- Directive support for functions
- onKeyStroke: directive support (#1362) (9f8eabb)
- useElementHover: directive support (#1359) (73b0def)
- useInfiniteScroll: directive support (#1340) (fd8ca8e)
- useIntersectionObserver: directive support (#1339) (53d4dfd)
- useScroll: directive support (#1348) (0daf86f)
- useScrollLock: directive support (#1360) (4356613)
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]
v7.7.0 by
github-actions[bot]
v7.6.2 by
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.0 by
github-actions[bot]
Bug Fixes
- integrations: relax peerDeps version, close #1189 (94411ad)
- ssr-handlers: fix
_global
is undefined (#1190) (5418f3b) - UseDraggable: add prop keystorageType (#1191) (20df83c)
- useElementBounding: update jsdoc (e1f64dc)
Features
- onClickOutside: add
ignore
option (#1205) (c275a2e) - onLongPress: new function (#1225) (eed2889)
- useCached: new function (#1169) (fb37135)
- useEagerComputed: allow specify watchOptions (#1192) (2473407)
- useFetch: support more http methods (#1149) (#1193) (01f8dfb)
- useInfiniteScroll: new function (#1219) (4f0ad36)
- useInterval: support ref as interval (#1215) (a2b2b0d)
- useOffsetPagination: new function (#1104) (b4b7e8e)
v7.5.5 by
github-actions[bot]
v7.5.4 by
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]
v7.5.2 by
github-actions[bot]
v7.5.0 by
github-actions[bot]
v7.4.3 by
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.1 by
github-actions[bot]
v7.4.0 by
github-actions[bot]
v7.3.0 by
github-actions[bot]
Bug Fixes
- useScrollLock: set the
overflow
property on iOS device as well (#1033) (1cae15d) - useWebSocket: close WebSocket gently (#1018) (4b296c7)
Features
- throttleFilter: leading fix (#1039) (496dbd9)
- useAsyncState: add option for choosing shallowRef or ref (#1040) (b995216)
- useElementByPoint: new function (#1022) (3edf763)
- useSafeArea: new function (#985) (3de76e1)
- useStorageAsync: new function (169b02b)
- useSubject: new function (#1012) (edc8cf6)
- useTextSelection: new function (#1038) (0b83b0f)
v7.1.2 by
github-actions[bot]
v7.1.1 by
github-actions[bot]
v7.1.0 by
github-actions[bot]
v7.0.2 by
github-actions[bot]
v7.0.1 by
github-actions[bot]
v7.0.0 by
github-actions[bot]
v10.4.1 by
github-actions[bot]
v10.4.0 by
github-actions[bot]
🚀 Features
- refAutoReset: Support maybe-ref as value - by @moander in #3342 (71685)
- useAsyncQueue: Support in infinite tasks in typescript - by @ethansnow2012 in #3333 (22e26)
- useBreakpoints: Add breakpoints for PrimeFlex - by @adrianrudnik and @antfu in #3317 (8b5ed)
- useDraggable: Allowing calculations of bounds with fixed element - by @linspw in #3335 (c08e5)
- useFetch: Introduce
updateDataOnError
option - by @climba03003 and @antfu in #3092 (945ca) - useIdbKeyval: Ability to wait for IDB writes - by @AbdallahAlhaddad and @antfu in #3338 (77a86)
- useWebNotification: Add
requestPermissions
option, returnpermissionGranted
andensurePermissions
- by @michealroberts and @antfu in #3325 (a1753)
🐞 Bug Fixes
- syncRef: Avoid infinite sync - by @chaii3 and @antfu in #3312 (bc966)
- useElementSize: Add
as
prop for component usage - by @menghany in #3274 (791f7) - useElementVisibility: Adjust threshold to 0 to fix visibility issue with large element - by @erikkkwu in #3308 (429ed)
- useFileSystemAccess: Make options to be optional - by @171h in #3320 (a9c8b)
- useMouse: Position won't be changed on page scroll when
type
ispage
, closes #2922 - by @CatsJuice and @antfu in #3244 and #2922 (c2f64) - useScroll: Evade edge case when window or document is Proxy - by @MinatoHikari in #3280 (c1b29)
- useScrollLock: Support using window or document - by @lzl0304 in #3319 (8acdb)
- useSortable: Fixed moveArrayElement repeatedly triggering side effects - by @Alfred-Skyblue in #3322 (b8515)
- useStorage: Read object only when it's serialized differently - by @chenglu4343, chenglu and @antfu in #2782 and #3091 (6fabe)
- useVModel: Clone set to true triggered infinite loop - by @motian and @antfu in #3097 (48f4c)
- useWebWorker: Prevent error event bubbling - by @Luvoy and @antfu in #3141 (34206)
- useWebsocket: PongTimeout auto-reconnect no work - by @shanyi-front and @antfu in #3321 (93372)
- useWebsocket: Reset pongTimeout on close - by @alipay404 and @antfu in #3324 (aea27)
- utils: Update
isClient
to checkdocument
too - by @brc-dd and @antfu in #3329 (786cb)
View changes on GitHub
v10.3.0 by
github-actions[bot]
🚀 Features
- createReusableTemplate: Inherit attrs - by @wiidede and @antfu in #3226 (a32ae)
- useActiveElement: Search deeply in shadow dom - by @duoduoObama and @antfu in #3208 (296dc)
- useCounter: InitialValue support ref - by @Rock070 in #3266 (6ae3a)
- useFocus: Support
:focus-visible
- by @onmax and @antfu in #3254 (80329) - useRTDB: Add errorHandler option - by @wobsoriano in #3232 (b5e52)
- useSorted: Accept getter function as source - by @wvffle in #3249 (33a12)
- useSpeechSynthesis: Add reactivity for pitch and rate - by @shestmintsev-kirill in #3205 (ac88f)
🐞 Bug Fixes
- build: Ensure correct typing for node esm - by @xiaoxiangmoe and @antfu in #3209 (e7556)
- createReusableTemplate: Camelize props - by @94726, @antfu and @wvffle in #3253 (d79e1)
- onClickOutside: Fix outside click on html element in ios - by @sibbng in #3252 (9091e)
- reactiveComputed: Unwrap reactive type - by @sxzz in #3215 (17a72)
- router: Improves router functions: synchronize values, adds tests, and optimize performance - by @anteriovieira, @antfu, CJBoy and tzyoo in #3184 (0d02f)
- toRefs: Don't trigger unwanted watchEffects - by @wvffle in #3260 (5309c)
- useDateFormat: Handle zero properly - by @JocelynFloresz and @antfu in #3272 (d6428)
- useEventListener: Improved
useEventListener
overload - by @Alfred-Skyblue in #3246 (4f414) - useFetch: Generated payloadType on execute - by @tolking in #3251 (b7e3d)
- useInfiniteScroll: Improve visibility check - by @erikkkwu in #3212 (5ce61)
- useMediaQuery: Only add/remove event listeners on query change - by @Ingramz and @antfu in #3236 (f3969)
- useObjectUrl: Improve parameter type - by @ferreira-tb in #3239 (d3f7e)
- usePointer: Add
pointerup
event forpressure
field - by @cunzaizhuyi and @antfu in #3217 (ee425) - useScroll: Support configurable window - by @sheremet-va and @antfu in #3229 (dde41)
View changes on GitHub
v10.2.1 by
github-actions[bot]
🚀 Features
- useDropZone: Expose more hooks - by @antfu (17d8d)
- useDropZone: Expose files as ref - by @antfu (6d4ef)
🐞 Bug Fixes
- fromEvent: Torn down properly - by @benlesh in #3155 (fa7ed)
- toRefs: Fix stack overflow caused by recursive
setPrototypeOf
- by @Alfred-Skyblue in #3166 (9f998) - useFullscreen: Skip exiting when not in fullscreen mode - by @tawen, @antfu and Fernando Fernández in #3144 (14edb)
- useInfiniteScroll: Prevent infinite load when v-show set false - by @wonderl17 in #3143 (a4dfa)
- useRafFn: Set initial delta to zero - by @haykkh in #3150 (cf6eb)
- useTimeoutPoll: Unexpected immediate execution - by @jiadesen in #3159 (7a897)
View changes on GitHub
v10.2.0 by
antfu
🚀 Features
- useAsyncQueue: Add
options.signal
parameter - by @cross-origin in #3033 (7da7c) - useColorMode: DisableTransition support pseudo-elements - by @lainbo in #3129 (78a3a)
- useDraggable: Improve component props - by @Alfred-Skyblue in #3075 (6b670)
- useElementByPoint: New
multiple
andinterval
options - by @okxiaoliang4 in #3089 (31b66) - useFileDialog: Add a parameter
reset
- by @zaqvil in #3059 (6d847) - useImage: Support referrerPolicy option - by @btea in #3132 (04d32)
- useSortable: Add option set get method - by @Alfred-Skyblue in #3108 (14283)
- useVModel: Improve types overload - by @Mini-ghost in #3055 (7d788)
🐞 Bug Fixes
- onClickOutside: Ensure focus on iframe captured in firefox - by @Geit in #3066 (2c66e)
- useAxios: Prevent premature loading refs reset - by @MickaelOth in #3076 (b1701)
- useCloned: Check for getter function to watch - by @ydcjeff in #3142 (6d630)
- useCssVar: Observe changes based on element class list - by @Waleed-KH in #3131 (9d34a)
- useMediaControls: Better representation for "waiting" value - by @ferferga in #3072 (0b253)
- useRouteHash,useRouteQuery,useRouteParams: Re-evaluates the value immediately - by @anteriovieira in #3002 (d5252)
- useScroll: Support window in setArrivedState - by @smallnine9 and yulj5 in #3086 (8855f)
- useScrollLock: Fix scrollable children check - by @valerypatorius in #3065 (cdc28)
- useTextareaAutosize: Autosize error when changing
input
asynchronously - by @jsonleex in #3118 (1b0ec) - useWebWorker: Add web worker transferable option - by @yassilah in #3123 (5988f)
- watchImmediate: Fix overload signature - by @ferreira-tb in #3114 (4b4e6)
🏎 Performance
- useCssVar: Only listen for style changes - by @Alfred-Skyblue in #3057 (3233a)
View changes on GitHub
v10.1.0 by
github-actions[bot]
🚀 Features
- useAsyncState: Add support directly await - by @Hfutsora and @antfu in #3004 (d4db0)
- useColorMode: Expose
state
to the ref, deprecatedemitAuto
- by @Waleed-KH and @antfu in #2980 (a1bef) - useMouse: Support custom event extractor - by @RAX7 and @antfu in #2991 (4bb5b)
- watch:
watchImmediate
andwatchDeep
support overloads - by @Mini-ghost in #2998 (8f6a0)
🐞 Bug Fixes
- Dialog mask add z-index - by @recallwei in #3005 (07ebe)
- useColorMode: Element ref support, close #3003 - by @antfu in #3003 (adbbb)
- useCycleList: Correctly wrap list with ref - by @fan5530 and @antfu in #2988 (659b2)
- useDateFormat: Error if Y or YYY provided - by @dinocam1 and Dino Camdzic in #3001 (a2147)
- useFullscreen:
isFullscreen
handling for mutliple fullscreen elements - by @zaqvil and @antfu in #3000 (4a7a1) - useMediaControls: Apply state when target ref changes - by @ferferga in #2999 (b20aa)
- useSwipe: Ignore multiple touches - by @ARZarkesh in #2994 (995aa)
- useSwipe: Ignore multiple touches - by @ARZarkesh and @antfu in #2996 (af3ca)
- useTransition: Fix regression with non-linear transition functions - by @scottbedard in #2973 (8b330)
View changes on GitHub
v10.0.2 by
github-actions[bot]
v10.0.1 by
github-actions[bot]
🐞 Bug Fixes
- nuxt: Do not auto-import
toRef
andtoValue
- by @antfu (9225f) - useIntersectionObserver: Targets length check - by @schelmo in #2968 (b95b6)
View changes on GitHub
v10.0.0 by
github-actions[bot]
✨ Highlights
createReusableTemplate
from https://github.com/antfu/vue-reuse-templatecreateTemplatePromise
from https://github.com/antfu/vue-template-promiseuseAnimate
for native animation API, thanks to @tolking- Renamed
resolveRef
totoRef
,resolveUnref
totoValue
, aligning with Vue 3.3: vuejs/core#7997 - Improved tree-shaking
- Cleaned up long-lasting PRs, thanks to all!
🚨 Breaking Changes
- Remove deprecated types - by @Alfred-Skyblue in #2656 (c2fee)
- Remove
isFunction
andisString
utils (cb644) - computedAsync:
- Set shallow defalut to true - by @xiankaiqun and @antfu in #2621 (23c9d)
- toRef:
- Rename
resolveRef
totoRef
(10e98)
- Rename
- types:
- Rename
MaybeComputedRef
toMaybeRefOrGetter
(4d757)
- Rename
- useAxios:
- useColorMode:
- Enable
disableTransition
by default (5c82c)
- Enable
- useElementVisibility:
- Use useIntersectionObserver instead of scroll event handler - by @curtgrimes in #2551 (74b00)
- useEventBus,createEventHook:
- Dedupe registration of the same function - by @Alfred-Skyblue in #2748 (dd514)
- useFullscreen:
- useIDBKeyval:
- Return format changed, add
isFinished
- by @jssullivan and james.sullivan in #2474 (ef281)
- Return format changed, add
- useInfiniteScroll:
- useSwipe:
- Use literal for swipe direction instead of enum (f285c)
- useToFixed:
- Remove deprecated function (a6e5b)
- useUserMedia:
- Add constraints - remove deviceIds - by @mango-martin in #2032 (8f2a3)
- Remove deprecated apis (85468)
- useWebNotification:
- Should be exposed as EventHooksOn - by @Alfred-Skyblue and @antfu in #2821 (bcd2a)
- useWindowSize:
🚀 Features
- Update deps (e75a5)
- Improve tree-shaking (3275e)
- createEventHook:
- createGlobalState:
- Allow passing initial args - by @jd-solanki and @antfu in #2790 (f21b2)
- createReusableTemplate:
- createTemplatePromise:
- onKeyStroke:
- reactiveOmit:
- Add predicate parameter - by @Alfred-Skyblue and @antfu in #2849 (2e297)
- reactivePick:
- Add predicate parameter - by @Alfred-Skyblue in #2850 (0bde4)
- toRef:
- Support two argument overrides from Vue (f307f)
- toValue:
- Rename
resolveUnref
totoValue
(0a72b)
- Rename
- useAnimate:
- useArrayDifference:
- New function - by @Alfred-Skyblue in #2710 (a2a33)
- useArrayIncludes:
- New function - by @Alfred-Skyblue and @antfu in #2708 (4d6bc)
- useArrayUnique:
- Add a custom function to deduplicate - by @Alfred-Skyblue in #2612 (c8c30)
- useAsyncValidator:
- useAxios:
- Added
onFinish
callback - by @Alfred-Skyblue in #2829 (a2f33) - Added
initialData
andresetOnExecute
options - by @Alfred-Skyblue and @antfu in #2791 (f54a3)
- Added
- useBreakpoints:
- Getting current breakpoints - by @ineshbose and @antfu in #2906 (bbabd)
- useBrowserLocation:
- useColorMode:
- useCssVar:
- Introduce
observe
option - by @Alfred-Skyblue in #2800 (ae6e1)
- Introduce
- useCycleList:
- useDark:
- Passthrough default handler from
useColorSchema
- by @godismyjudge95 and @antfu in #2866 (d6d35)
- Passthrough default handler from
- useDark, useColorMode:
- Introduce
disableTransition
option (320ab)
- Introduce
- useDraggable:
- useFetch:
- useFileDialog:
- Add listener for file change events - by @Alfred-Skyblue in #2893 (5e697)
- useFirestore:
- useIdle:
- useIntersectionObserver:
- useMouse:
- Support
type: screen
- by @francoislevesque in #2467 (39d18)
- Support
- useParentElement:
- New function - by @jd-solanki and @antfu in #2855 (e8168)
- usePerformanceObserver:
- New function - by @LockingReal, Admin and @okxiaoliang4 in #2736 (21536)
- useResizeObserver:
- useRouteQuery,useRouteParams:
- useSortable:
- New function - by @Alfred-Skyblue, @okxiaoliang4 and @antfu in #2763 (6bc60)
- useSupported:
- useSwipe, usePointerSwipe, useTransition:
- Improve tree-shaking - by @webistomin and @antfu in #2863 (08c21)
- useTextareaAutosize:
- Added
styleTarget
option to style other element - by @jd-solanki in #2312 (a3e95)
- Added
- useTransition:
- Expose transition utility for manual control - by @scottbedard in #2743 (526d5)
- Support
MaybeComputedRef
- by @zhiyuanzmj in #2871 (5944e)
- useVModel:
- Add
shouldEmit
hook - by @baiwusanyu-c and @antfu in #2836 (f8a53)
- Add
- watch:
- Shorthands for watch - by @mrhammadasif in #2651 (b4ec7)
🐞 Bug Fixes
- Use ts-ignore instead of ts-expect-error for version-specifc errors - by @sodatea in #2802 (37ec7)
- Upgrade vue-demi (976d8)
- onStartTyping: Fix char ascii - by @meenie-net in #2932 (e9ab3)
- toRef: Improve types overload, close #2925 - by @antfu in #2925 (cb6f9)
- useArrayDifference: Error with falsey - by @simpleoo0o and lix in #2869 (41858)
- useAsyncState: Fix toThrowError error type - by @Alfred-Skyblue in #2898 (b636f)
- useAsyncValidator: Incorrect condition for choosing constructor - by @theruziev in #2788 (93b45)
- useDevicesList: Show devices for Firefox - by @felixzapata in #2798 (0823d)
- useElementHover:
window
is not defined - by @okxiaoliang4 in #2793 (c86f2) - useFetch: Abort before updating state - by @Alfred-Skyblue in #2805 (fff45)
- useFullscreen: Handle Safari iOS - by @ferferga and @antfu in #2822 (9d394)
- useMounted: Check for the current instance (1aab1)
- useScroll: Add support for row-reverse and column-reverse - by @OneLoneFox and @antfu in #2577 (23b9a)
- useSortable: Order of dom and array is different - by @Alfred-Skyblue in #2926 (3a508)
- watchDeep,watchImmediate: Fix callback function execution logic - by @Alfred-Skyblue in #2951 (e6e25)
🏎 Performance
- useStorageAsync,useFetch: Replace setTimeout with Promise - by @Alfred-Skyblue in #2917 (8bd63)
View changes on GitHub
v10.0.0-beta.5 by
github-actions[bot]
🚨 Breaking Changes
- Remove
isFunction
andisString
utils - by @antfu (cb644) - useInfiniteScroll: Improve loading strategies, close #1701, close #1685 - by @antfu in #1701 and #1685 (d3a2b)
🚀 Features
- Improve tree-shaking - by @antfu (3275e)
- createReusableTemplate: New function - by @antfu in #2961 (bd53c)
- createTemplatePromise: New function - by @antfu and Enzo Innocenzi in #2957 (13169)
🐞 Bug Fixes
View changes on GitHub
v10.0.0-beta.4 by
github-actions[bot]
🚨 Breaking Changes
- toRef: Rename
resolveRef
totoRef
- by @antfu (10e98) - types: Rename
MaybeComputedRef
toMaybeRefOrGetter
- by @antfu (4d757) - useAxios: Reject promise on
execute
- by @FRSgit and @antfu in #2485 (edece) - useColorMode: Enable
disableTransition
by default - by @antfu (5c82c)
🚀 Features
- toRef: Support two argument overrides from Vue - by @antfu (f307f)
- toValue: Rename
resolveUnref
totoValue
- by @antfu (0a72b) - useAnimate: New function - by @tolking and @antfu in #2109 (bcf5d)
- useAxios: Added
initialData
andresetOnExecute
options - by @Alfred-Skyblue and @antfu in #2791 (f54a3) - useColorMode: Support passing element as
selector
- by @Wing-9527 and @antfu in #2760 (02ccc) - useColorMode: Expose
system
andstore
ref, close #2023 - by @antfu in #2023 (d150c) - useDraggable: Support
capture
option - by @faga295 and @antfu in #2725 (3996d) - useIntersectionObserver: Support for
Pausable
interface - by @Mini-ghost and @antfu in #2883 (4b336) - useMouse: Support
type: screen
- by @francoislevesque in #2467 (39d18) - useRouteQuery,useRouteParams: New
transform
handler - by @edumudu and @antfu in #2191 (d23ca)
🐞 Bug Fixes
- useScroll: Add support for row-reverse and column-reverse - by @OneLoneFox and @antfu in #2577 (23b9a)
View changes on GitHub
v10.0.0-beta.3 by
github-actions[bot]
🚨 Breaking Changes
- useAxios: Remove deprecated apis - by @antfu (1f8b9)
- useFullscreen: Better cross-platform compatibility - by @ferferga and @antfu in #2915 (2e467)
- useToFixed: Remove deprecated function - by @antfu (a6e5b)
- useUserMedia: Remove deprecated apis - by @antfu (85468)
- useWindowSize: Use media query instead of
orientationchange
listener - by @zhousg and @antfu in #2919 (4e7b0)
🚀 Features
- Update deps - by @antfu (e75a5)
- useDraggable: Introduce
axis
option - by @Alfred-Skyblue and @antfu in #2948 (0842a) - useFirestore: Support delay for autoDispose, fixes #2252 - by @Zehir in #2276 and #2252 (05781)
🐞 Bug Fixes
- onStartTyping: Fix char ascii - by @meenie-net in #2932 (e9ab3)
- useMounted: Check for the current instance - by @antfu (1aab1)
- useSortable: Order of dom and array is different - by @Alfred-Skyblue in #2926 (3a508)
- watchDeep,watchImmediate: Fix callback function execution logic - by @Alfred-Skyblue in #2951 (e6e25)
🏎 Performance
- useStorageAsync,useFetch: Replace setTimeout with Promise - by @Alfred-Skyblue in #2917 (8bd63)
View changes on GitHub
v10.0.0-beta.2 by
github-actions[bot]
🚨 Breaking Changes
- useElementVisibility: Use useIntersectionObserver instead of scroll event handler - by @curtgrimes in #2551 (74b00)
🚀 Features
- onKeyStroke: Support ignoring repeated stroke - by @vaakian in #2652 (22ca5)
- reactiveOmit: Add predicate parameter - by @Alfred-Skyblue and @antfu in #2849 (2e297)
- reactivePick: Add predicate parameter - by @Alfred-Skyblue in #2850 (0bde4)
- useArrayUnique: Add a custom function to deduplicate - by @Alfred-Skyblue in #2612 (c8c30)
- useAsyncValidator: Add
manual
option - by @jaw52 and @antfu in #2903 (16461) - useAxios: Added
onFinish
callback - by @Alfred-Skyblue in #2829 (a2f33) - useBreakpoints: Getting current breakpoints - by @ineshbose and @antfu in #2906 (bbabd)
- useDark: Passthrough default handler from
useColorSchema
- by @godismyjudge95 and @antfu in #2866 (d6d35) - useParentElement: New function - by @jd-solanki and @antfu in #2855 (e8168)
- useResizeObserver: Support element list - by @acyza and @antfu in #2841 (3e187)
- useSupported: Support tracking reactivity for the callback function - by @ferferga and @antfu in #2904 (55a32)
🐞 Bug Fixes
- useDevicesList: Show devices for Firefox - by @felixzapata in #2798 (0823d)
View changes on GitHub
v10.0.0-beta.1 by
github-actions[bot]
🚀 Features
- useAsyncValidator: Add immediate and execute - by @jaw52 and @antfu in #2899 (79176)
- useFileDialog: Add listener for file change events - by @Alfred-Skyblue in #2893 (5e697)
- useIdle: Add
reset
capability - by @nahvego and @antfu in #2880 (f4d35) - useTransition: Support
MaybeComputedRef
- by @zhiyuanzmj in #2871 (5944e) - useVModel: Add
shouldEmit
hook - by @baiwusanyu-c and @antfu in #2836 (f8a53)
🐞 Bug Fixes
- useArrayDifference: Error with falsey - by @simpleoo0o and lix in #2869 (41858)
- useAsyncState: Fix toThrowError error type - by @Alfred-Skyblue in #2898 (b636f)
View changes on GitHub
v10.0.0-beta.0 by
github-actions[bot]
🚨 Breaking Changes
- Remove deprecated types - by @Alfred-Skyblue in #2656 (c2fee)
- computedAsync: Set shallow defalut to true - by @xiankaiqun and @antfu in #2621 (23c9d)
- useAxios:
error
should return typeunknown
- by @jbaubree and @antfu in #2807 (d8d73) - useEventBus,createEventHook: Dedupe registration of the same function - by @Alfred-Skyblue in #2748 (dd514)
- useIDBKeyval: Return format changed, add
isFinished
- by @jssullivan and james.sullivan in #2474 (ef281) - useSwipe: Use literal for swipe direction instead of enum - by @antfu (f285c)
- useUserMedia: Add constraints - remove deviceIds - by @mango-martin in #2032 (8f2a3)
- useWebNotification: Should be exposed as EventHooksOn - by @Alfred-Skyblue and @antfu in #2821 (bcd2a)
🚀 Features
- createEventHook: Allow awaiting on
trigger
- by @Akryum and @antfu in #2824 (31347) - createGlobalState: Allow passing initial args - by @jd-solanki and @antfu in #2790 (f21b2)
- useArrayDifference: New function - by @Alfred-Skyblue in #2710 (a2a33)
- useArrayIncludes: New function - by @Alfred-Skyblue and @antfu in #2708 (4d6bc)
- useBrowserLocation: Two-way binding - by @sxzz in #2168 (a860c)
- useCssVar: Introduce
observe
option - by @Alfred-Skyblue in #2800 (ae6e1) - useCycleList: Allow receiving reactive list - by @hjJunior and @antfu in #2864 (b65c2)
- useDark, useColorMode: Introduce
disableTransition
option - by @antfu (320ab) - useFetch: Update data on success - by @pbrzosko and Przemyslaw Brzosko in #2711 (78cfb)
- usePerformanceObserver: New function - by @LockingReal, Admin and @okxiaoliang4 in #2736 (21536)
- useSortable: New function - by @Alfred-Skyblue, @okxiaoliang4 and @antfu in #2763 (6bc60)
- useSwipe, usePointerSwipe, useTransition: Improve tree-shaking - by @webistomin and @antfu in #2863 (08c21)
- useTextareaAutosize: Added
styleTarget
option to style other element - by @jd-solanki in #2312 (a3e95) - useTransition: Expose transition utility for manual control - by @scottbedard in #2743 (526d5)
- watch: Shorthands for watch - by @mrhammadasif in #2651 (b4ec7)
🐞 Bug Fixes
- Use ts-ignore instead of ts-expect-error for version-specifc errors - by @sodatea in #2802 (37ec7)
- useAsyncValidator: Incorrect condition for choosing constructor - by @theruziev in #2788 (93b45)
- useElementHover:
window
is not defined - by @okxiaoliang4 in #2793 (c86f2) - useFetch: Abort before updating state - by @Alfred-Skyblue in #2805 (fff45)
- useFullscreen: Handle Safari iOS - by @ferferga and @antfu in #2822 (9d394)