Releases: juliencrn/usehooks-ts
Releases · juliencrn/usehooks-ts
usehooks-ts@2.12.0
Minor Changes
- cb6eb5c: Added an optional option param in
useDocumentTitle()
to reset title on un-mount (#345 by @ladislasdellinger)
Patch Changes
- b8ee088: move
lodash.debounce
to dependencies from peerDependencies (#459 by @BlankParticle)
usehooks-ts@2.11.0
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)
usehooks-ts@2.10.0
2.10.0
Minor Changes
- 8f3c90f: Enable setting localStorage key for useDarkTheme & useTernaryDarkMode (#298 by @ubarbaxor)
- ae47c9a: Expose setting dark mode value directly (#299 by ubarbaxor)
- 771afa5: Add serialization support for use-*-storage hooks
Patch Changes
- a816d6b: Depreciated useSsr #258
- 42f3a3a: Remove the need of commenting out useEffect deps in useMediaQuery (#383 by @lisandro52)
- 9bc05f4: Fix hydration mismatch on use***Storage (fixes #176, #369 with #320 & #251)
- 771afa5: Add Date, Set & Map support to use*Storage (#309 by @AlecsFarias)
- 4b3ed4e: Fix circular dependencies (#310)
- a3588b8: Added unit tests for useFetch hook
- c326dd3: Prevent unrelated storage keys from being updated unexpectedly in useLocalStorage and useSessionStorage (#313 by @stevenvachon fixes #384)
- e8aa777: make useLocalStorage and useSessionStorage compliant with useState (fixes #204 with #242 by @valyrie97)
- c5ad2b9: Recalculate useLocalStorage & useSessionStorage default value on dynamic key change (#355 by @amirking59)
- 7406e3c: fix(useCopyToClipboard): added useCallback to 'copy' to avoid rerendering (by @nmacianx)
- ffe0f32: Set sideEffects to false in package.json
usehooks-ts@2.9.5
usehooks-ts@2.9.1
Fixes
- fix hard-coded useLockedBody anchor id
- useEventListener passes options to removeEventListener (#235 by @marnusw)
- rename useBoolean, useCounter, useLockedBody and useSidebar hooks ReturnType to Output (#234 by @valentinpolitov)
usehooks-ts@2.9.0
Fixes
- Transpile commonjs to es5 and esm to es6 (fixes #232)
usehooks-ts@2.8.0
Added
- Added
useToggle
- Added options in
useScript
(#203, #197 by @curtvict) - Added media query support to
useEventListener
(#194 from @modex98)
Updated
- Remove unnecessary
import React from "react"
Fixes
- docs misspelling (#189 by @JoshuaCS94)
useIntersectionObserver
deps (#195 from @Guesswhoitis)
usehooks-ts@2.7.2
Added
Updated
- Removed
import React
line (not needed since react 17)
Fixes
- Fixed misspelling (thanks to @alexisoney and @JoshuaCS94)
usehooks-ts@2.7.1
usehooks-ts@2.7.0
Updated
- Move
usehooks-ts
to the root - Simplify config files (removing some tools)
- Split the documentation website from the workspace
- Regroup hooks related files together (test, doc, demo, hook)
- Upgrade dependencies
See: #208