Minor Changes
-
#446
0b66d40Thanks @hyesungoh! -useDebouncedCallbackanduseThrottledCallbacknow accept any value type:onChangeis typed(newValue: T) => voidinstead of(newValue: boolean) => void, so a debounced search query or a throttled scroll position no longer needs a cast. Existing boolean callers are unaffected.useDebouncedCallbackno longer drops a first call offalse. It compared incoming values against a seed offalse, so the very firstfalselooked redundant and was never forwarded; the comparison now starts from a sentinel, asuseThrottledCallbackalready did. Afalsethat arrives while an initialtrueis still pending now replaces it instead of being ignored.useImpressionRefno longer emitsonImpressionEndfor an element that was never impressed.
Patch Changes
-
#450
a4251a3Thanks @hyesungoh! -useDebouncedCallbackanduseThrottledCallbackno longer forward a stale value when the caller returns to the last forwarded one. Calling with'seo'and then'seoul'right after'seoul'had already been forwarded used to skip the second call as a duplicate without cancelling the pending'seo', soonChange('seo')fired anyway. The pending call is now cancelled first. ForuseThrottledCallbackthis only showed withedges: ['trailing']; the default leading edge forwards the intermediate value immediately and masked it. -
#452
fd312f5Thanks @hyesungoh! - JSDoc corrections that show up in editor hover.useIntersectionObserver'soptions.rootis typedElement | Document | nullinstead ofboolean.useListanduseSetnow declare their generic parameter, their optional initial state and every member they return.mergePropsandmergeRefsmark their rest parameter as one, so the documented signature matches the implementation. -
#456
65ce435Thanks @mnxmnz! - Re-export theSafeAreaInsettype from the package root.@react-simplikit/mobileexported it, but it was dropped when that package was absorbed into the root entry, leavingimport type { SafeAreaInset }with no replacement. -
#435
9e05182Thanks @hyesungoh! -useDoubleClick,useGeolocation,useImpressionRef,useIntersectionObserver,useLongPress,useOutsideClickEffect,useStorageStateanduseVisibilityEventare no longer marked@deprecated. They are maintained hooks again: editors stop rendering them struck-through, and no removal is planned.