🚀 Features
- createEventHook: Add
clear
function - by @ilyaliao in #4378 (40265) - useBase64: Add options for Data URL output control - by @ilyaliao and Jelf in #4316 (4b4bd)
- useDeviceMotion: Add permission controls, improve destructure - by @thefeymesaleng and @antfu in #4127 (cf729)
- useElementVisibility: Add
rootMargin
option - by @dritter and @antfu in #4100 (3a928) - useMediaControls: Add 'media' option to define media query for resources - by @aaronLejeune in #4344 (209de)
- useRafFn: Allow framerate to be a reactive value - by @OrbisK and Anthony Fu in #4409 (4759f)
- useSSRWidth: Add optional support for SSR in useMediaQuery and useBreakpoints - by @Tofandel, Anthony Fu and @antfu in #4317 (55965)
- useUrlSearchParams: Add
writeMode
options - by @ishakhorski, Ivan Shakhorski and @antfu in #4392 (2c972) - useWebSocket: Introduce
autoConnect
options to control auto connections on url changes - by @ilyaliao and @antfu in #4417 (05e75) - useWebsocket: Support ref or getter as message - by @SnowGuest, Anthony Fu and @antfu in #4116 (a72c0)
- useWindowSize: Add
type: visual
option that leveragevisualViewport
- by @huiliangShen and @antfu in #4395 (e78ef)
🐞 Bug Fixes
- injectLocal: Allow inject to app context - by @antfu (b08a9)
- useAsyncState: Use ShallowRef instead of Ref type - by @joris-gallot and Anthony Fu in #4294 (4d0a7)
- useDropZone: Update type to allow readonly array param - by @briankchan in #4319 (df363)
- useFetch: Handle empty payload - by @ilyaliao in #4366 (8a89d)
- useMediaQuery: The return value should be computed - by @alexzhang1030 and @antfu in #4403 (3af75)
- useRouteParams,useRouteQuery: Set route param/query to undefined when defaultValue is ref or getter - by @vojvodics and Anthony Fu in #3977 (23fdb)
- useScroll: To properly report arriveState for elastic scroll - by @719media and Anthony Fu in #4133 (90ff4)
- useTextareaAutosize: Make input required - by @axuj, @antfu and Anthony Fu in #4129 (25ed2)
- useWebNotification: Prevent notifications when checking for support - by @9romise in #4019 (01f92)
- useWebSocket: Close socket connection inside WebWorker fix - by @catz in #4229 (ece6a)