Skip to content

Latest commit

 

History

History
437 lines (224 loc) · 27.8 KB

CHANGELOG.md

File metadata and controls

437 lines (224 loc) · 27.8 KB

1.11.0 (2024-12-06)

Bug Fixes

  • fix TypeScript types error in React v19 (870161f)
  • useTimeout: fix immediate option not working (8edf98d)

Features

  • update dependencies & support React v19 (ee7e58c)

1.10.2 (2024-11-06)

Bug Fixes

  • useWebSocket: fix TS type definition & not retry on first failed open (b436935)

1.10.1 (2024-11-01)

Bug Fixes

  • useVirtualList: fix Maximum update depth exceeded error when list is empty (9d78057)

1.10.0 (2024-10-29)

Bug Fixes

  • useGeolocation: fix TS type definition (c39ec03)
  • useKeyStroke: fix TS type definition (a9b1a5f)
  • usePagingList: fix TS type definition (6ceb776)

Features

  • useForm: deprecated triggerOnChangeWhenReset options (28f9a69)

1.9.4 (2024-10-25)

Bug Fixes

  • useCountdown: fix TS type definition for DateLike (3615692)
  • useCounter: fix setState may not controlled by max & min options (67bb246)
  • useDropZone: fix dataTypes may not work correctly in some cases (4a44b4b)
  • useDynamicList: fix setList may not work in some cases (ef538ab)
  • useFavicon: fix TS type definition (4998afc)

1.9.3 (2024-10-23)

Bug Fixes

  • useInfiniteScroll: fix reset may not work as expected when frequency is too high (c129047)

1.9.2 (2024-10-22)

Bug Fixes

  • useInfiniteScroll: fix loadMore may not be called when container too large in some cases (36e10a1)
  • useQuery: fix params update issue when data was not changed (3497c4b)
  • useQuery: fix TS type definition for global mutate (83941ab)

Performance Improvements

  • useQuery: don't cache promise when not set cacheKey (9e0d513)

1.9.1 (2024-10-16)

Bug Fixes

  • useAsyncFn: fix initialParams may not work when initialParams is a function & params not update after initial call (2ee1c2f)
  • useAsyncFn: fix initialParams not working when set (9b5c7a1)
  • useAsyncFn: fix TS type definition error (ccd107e)
  • useInfiniteScroll: fix loadMore may be called twice when first mount in some scenarios. (319c863)
  • useQuery: fix onError params (921f947)

1.9.0 (2024-10-09)

Bug Fixes

  • useManualStateHistory: fix expired state action (17b44c6)
  • useQuery: fix useQuery errorRetryCount default value, set to 0 (8521206)
  • useStepper: fix expired action (3abf4d7)
  • useThrottledEffect: fix influence of first render on throttle, first automatic call should not call throttled callback (2182b37)
  • useTimeout: fix reset not pause the timer (d99734c)
  • useUserIdle: fix TS type definition error (1af1476)
  • useVersionedAction: use object instead of counter to prevent overflow (9229b4b)
  • useWindowScroll: fix maxY & maxX may be negative number (399d32f)

Features

  • useCounter: support native setState to avoid expired state (5851637)
  • useTextDirection: support empty string to clear attr (a6e341a)

Performance Improvements

  • useTimeAgo: use useCreation to improve performance, avoid unnecessary re-renders (ee9bc75)

1.8.0 (2024-09-26)

Bug Fixes

  • useCircularList: fix initial invalid state not fallback to fallback value (73d6147)
  • useClonedState: fix custom cloneFn not working (12f4d19)
  • useCounter: fix initial count not limited by max & min options (882562e)
  • useDateFormat: fix params type definition (5b940b2)
  • useDynamicList: fix sort not working as expected (d8c548e)
  • useInfiniteScroll: fix dependencies collection not working (02a0aca)
  • useSafeState: fix casual incorrect update after multiple update when using deep option in some cases. (c561168)
  • useWebSocket: fix reconnect (or close retry) (15ffdfb)

Features

  • useRetryFn: support retry.cancel method to cancel retry (f50c472)
  • useTimeAgo: support more language messages, by passing internal messages to props (9e0a1e9)
  • useUserIdle: support dependencies collection (b1db445)

Performance Improvements

  • useSetState: not update state when no key is provided (007680a)

1.7.0 (2024-09-11)

Bug Fixes

  • useInfiniteScroll: fix not loading when it has more space to scroll after first load (c4036ca)
  • useInfiniteScroll: use useLatest to avoid expired callbacks (1e8164e)
  • useMultiSelect: fix returned type definition (33dfcd6)
  • useQuery: fix internal behavior params missing bug (should run refresh, not run) (3fbfb5e)
  • useQuery: fix useQuery run method return value when throttle and debounce are not set (2f25b3e)

Features

  • add new Hook useForm to handle form state, both for controlled and uncontrolled forms (44137ff)
  • add new Hook useInfiniteList to handle infinite list (1538cf9)
  • add new Hook usePagingList to handle paging list (a3b1598)
  • add new Hook useVersionedAction to run versioned action (f34bfa7)
  • add new Hook useWebSocket to handle WebSocket connections (edc568c)
  • rename useProList to usePagingList (574d37f)
  • useInfiniteScroll: add loadMore method to load more manually & reset to reset, deprecated isLoading, prefer loading (20d4fd8)
  • useInfiniteScroll: add reset method to reset state & fix horizontal scroll issue (37ddd58)
  • useMultiSelect: add unselect and unselectAll, deprecated unSelect and unSelectAll. (26142ff)
  • usePagination: add countStart and countEnd to returns (dcbcad9)
  • usePagination: add page and pageSize in returns (c2e060c)

1.6.0 (2024-08-29)

Bug Fixes

  • useInfiniteScroll: fix isLoading & isLoadDone state not update expectedly (3ef21b9)
  • useQuery: fix refresh not controlled by debounce and throttle options (701c7d0)

Features

  • add exports for package.json (df08736)
  • add new Hook useVirtualList to improve large list render performance, support both vertical and horizontal mode. (429cc3c)

1.5.0 (2024-08-21)

Bug Fixes

  • useQuery: fix global mutate params error (3d35a3b)

Features

  • add internal useTrackedRefState & useVersionedAction hooks (783fa7c)
  • add new Hook useFirstRender to check whether it's the first render. (aee59cd)
  • useAsyncFn: rewrite to use auto-tracked state to improve performance (3ec255e)
  • useClipboard: enhance legacyCopy behavior (bccfecb)
  • useClipboardItems: rewrite to use auto-tracked state to improve performance (2d91adb)
  • useClipboardItems: support onCopy & onCopiedReset callback (0d1e70d)
  • useClipboard: rewrite to use auto-tracked state to improve performance (5ce34da)
  • useClipboard: support onCopy & onCopiedReset callback (3871844)
  • useLatest: reduce unnecessary assignment (3cad80a)
  • useLoadingSlowFn: rewrite to use auto-tracked state to improve performance (972264a)
  • usePagination: support return sliced list directly (pass list in options), add indexStart, indexEnd in returns (2ed32ff)
  • usePerformance: support entryTypes check (d9f39e4)
  • usePrevious: support deep option to deep compare previous state (204b4b6)
  • useQuery: add new Hook useQuery renamed from useRequest (11f65e7)
  • useQuery: rewrite to use auto-tracked state to improve performance (72adce9)
  • useQuery: support onErrorRetryFailed option (357e77a)
  • useRequest: deprecated useRequest, please use useQuery instead. (26c516c)
  • useWebObserver: support additional supported check for specific observer (d30a906)

1.4.0 (2024-08-09)

Bug Fixes

  • useAsyncFn: fix race condition bug (9071e38)
  • useResetState: fix returned initialValue (5e1288f)
  • useToggle: fix hook returned value (dd976b9)

Features

  • add new Hook useInputComposition to track composition state of input element (5be4b66)
  • createSingleLoading: deprecated, it will be removed in the future, maybe moved to @shined/reactive (8b479c7)
  • new Hook useLoadingSlowFn to track loading slow state (732fa3f)
  • new Hook useReConnect to run a callback when re-connect (772aba0)
  • new Hook useReFocus to run a callback when re-focus (88cc9f2)
  • new Hook useRetryFn to create a function with retry mechanism (2ecebc0)
  • useAsyncFn: mutate & refresh support params (02ff03d)
  • useAsyncFn: support compare options to control render behavior (dfed260)
  • useAsyncFn: support onError callback (072f0cf)
  • useAsyncFn: support lifecycle callbacks & improve render performance (fe1b821)
  • useAsync: support onMutate, onCancel, onRefresh callbacks (a129849)
  • useReactive: deprecated, it will be removed in the future, maybe moved to @shined/reactive (03ac5d9)

Performance Improvements

  • useLoadingSlowFn: using getter to refine performance (31a59ca)

1.3.0 (2024-07-15)

Features

1.2.1 (2024-07-10)

Bug Fixes

  • use useMount to improve performance (0237634)
  • useUrlSearchParams: fix wrong Hook usage (6efb038)

1.2.0 (2024-07-10)

Bug Fixes

  • useActiveElement: use useLayoutMount to prevent layout jitter (f8e2597)
  • useBreakpoints: use useDeepCompareLayoutEffect to prevent layout jitter (5a58843)
  • useCssVar: use useLayoutMount to prevent layout jitter (7935a16)
  • useFavicon: use useLayoutMount to prevent layout jitter (d0c8233)
  • useFocus: use useLayoutMount to prevent layout jitter (f295032)
  • useMediaQuery: use useDeepCompareLayoutEffect to prevent layout jitter (11f164f)
  • useNetwork: use useIsomorphicLayoutEffect to prevent layout jitter (04255e7)
  • useSupported: use useIsomorphicLayoutEffect to prevent layout jitter (b53787a)
  • useTextDirection: use useLayoutMount to prevent layout jitter (fc4743e)
  • useUrlSearchParams: use useLayoutMount to prevent layout jitter (584d1f8)
  • useWindowFocus: use useLayoutMount to prevent layout jitter (273e959)
  • useWindowScroll: use useLayoutMount to prevent layout jitter (d136b2d)
  • useWindowSize: use useLayoutMount to prevent layout jitter (c1d0b90)

Features

  • useLayoutMount: add useLayoutMount Hook (25bb07f)

1.1.4 (2024-07-09)

Bug Fixes

  • useControlledComponent: fix TS generic type error (7292a1b)

1.1.3 (2024-07-03)

Bug Fixes

  • useInfiniteScroll: fix onScroll event not being triggered when target scroll (73a9c98)
  • useParallax: remove unused options. (10f6b77)
  • useTargetElement: advance the reffable value resolve time in target element (e376649)
  • useTitle: correct unify type name (19338b9)

1.1.2 (2024-07-02)

Bug Fixes

  • createSingleLoading, useReactive: use create option to avoid import and ESM require error (2b8548c)

1.1.1 (2024-07-02)

Bug Fixes

  • useReactive, createSingleLoading: use require to dynamic import to avoid no dep error (fc9d1ee)

1.1.0 (2024-07-02)

Bug Fixes

  • useEventListener: should re-add-and-remove event when ref.current changed (6ffdc9d)
  • useUrlSearchParams: fix type import (2fc0366)

Features

  • useDynamicList: add setList method in return actions (0eff4b4)

1.0.2 (2024-06-26)

Bug Fixes

  • use union TS type name (8ac5221)
  • useCircularList: use uniform type name (777f851)

Performance Improvements

  • make TS type more strict (add readonly to tuple returns) (d5dda51)

1.0.1 (2024-06-25)

Bug Fixes

  • useAsyncEffect: fix isCancelled method in callback arguments. (07d3aa4)

1.0.0 (2024-06-25)

1.0.0-alpha.4 (2024-06-24)

Bug Fixes

1.0.0-alpha.3 (2024-06-21)

1.0.0-alpha.2 (2024-06-21)

1.0.0-alpha.1 (2024-06-21)

Bug Fixes

Features

  • add unicode symbol format mode (4afbb08)
  • return restore in useTitle (fbdabd2)
  • support restoreOnUnmount in useFavicon (9381e77)
  • useTitle: support gettable title in SSR (16c9d5a)