Minor Changes
- add1431: Created
useUnmount
hook - add1431: Created
useDebounceCallback
anduseDebounceValue
hooks - add1431: Depreciated
useDebounce
hook (replaced byuseDebounceCallback
oruseDebounceValue
) - fc8a30e: Fix hydration issues in both useScreen and useMediaQuery (Fixes #394, thanks to @bryantcodesart)
- 4a9fc88: Introduce the SSR-friendly new optional
{ initializeWithValue?: boolean }
parameter touseLocalStorage
,useReadLocalStorage
,useSessionStorage
,useDarkMode
,useTernaryDarkMode
,useMediaQuery
,useScreen
,useWindowSize
anduseElementSize
, see #451. - 5c210c1: Add
defaultValue
option touseTernaryDarkMode
and update its signature (using function overload for smooth migration) - 5c210c1: Update
useDarkMode
signature (using function overload for smooth migration) - 0321342, 4a9fc88: Drop
Map
,Set
andDate
supports in use*Storage hooks, it isn't compatible withuseReadLocalStorage
making the API un-consistent. Use a custom serializer/deserializer instead.
Patch Changes
- add1431: Upgrade dependencies
- a192167: Upgraded
react
and@testing-library/react
(thanks to @TheHaff) - 0321342: Make Typescript and
@typescript-eslint
stricter to catch bugs sooner - 382161a: Depreciate
useImageOnLoad
, too opinionated - 382161a: Add JSdoc comments to improve DX via in-IDE documentation
- a192167: Migrate from
jest
tovitest
(making test-suite execution 2 times faster)