New
v3.9.1
What's Changed
- :new: 新功能
- feat: usemount 支持析构函数 by @iambimo24 in https://github.com/alibaba/hooks/pull/2713
- type: useUrlState 参数类型添加数组 by @zhuleizhang in https://github.com/alibaba/hooks/pull/2790
- :wrench: 配置更新
- chore: 更新开发依赖 by @li-zhen-zhennnnnn in https://github.com/alibaba/hooks/pull/2802
- chore: 升级依赖版本并在 CI 中使用 nodejs v20,22 by @ianzone in https://github.com/alibaba/hooks/pull/2800
- :bug: 问题修复
- fix: createUseStorageState 类型未知问题 by @Meet-student in https://github.com/alibaba/hooks/pull/2795
- fix: 修复 useRequest 在启动两个以上轮询时,设置页面隐藏停止轮询,页面重新显示时,有请求不自动开始轮询的问题。 by @JaxonJay in https://github.com/alibaba/hooks/pull/2688
- fix: 修复 useInfiniteScroll 时序竞争问题 by @duwenhan2byte in https://github.com/alibaba/hooks/pull/2786
- fix: 提取集合操作的公共函数 by @maxiaokai1996 in https://github.com/alibaba/hooks/pull/2661
- fix: 修复 readyState 判断问题 by @dongmucat in https://github.com/alibaba/hooks/pull/2705
- fix: tsconfig 问题 by @ianzone in https://github.com/alibaba/hooks/pull/2805
- :art: 代码重构
- refactor(useTheme): 提高代码可读性 by @w2xi in https://github.com/alibaba/hooks/pull/2803
- Refactor jest to vitest by 2814 by @Meet-student in https://github.com/alibaba/hooks/pull/2818
- :book: 文档修复
- docs: 修复 useClickAway 在 React 19 中的示例 by @li-jia-nan in https://github.com/alibaba/hooks/pull/2798
- docs: 修复 useFusionTable 在 React 19 中的示例 by @li-jia-nan in https://github.com/alibaba/hooks/pull/2799
- :white_check_mark: 测试更新
- test(use-url-state): 使用 vitest 进行测试 by @ianzone in https://github.com/alibaba/hooks/pull/2804
- test(createDeepCompareEffect): 使用 vitest 进行测试 by @ianzone in https://github.com/alibaba/hooks/pull/2807
- test(createUpdateEffect): 使用 vitest 进行测试 by @ianzone in https://github.com/alibaba/hooks/pull/2810
- test(useBoolean): 使用 vitest 进行测试 by @ianzone in https://github.com/alibaba/hooks/pull/2813
- test(useStorageState): 使用 vitest 进行测试 by @ianzone in https://github.com/alibaba/hooks/pull/2811
- test(useAsyncEffect): 使用 vitest 进行测试 by @ianzone in https://github.com/alibaba/hooks/pull/2812
- :construction_worker: CI 相关
- ci: 添加 pkg.pr.new by @Wxh16144 in https://github.com/alibaba/hooks/pull/2722
- :new: New Features
- feat: usemount supports destructor by @iambimo24 in https://github.com/alibaba/hooks/pull/2713
- type: The parameter type of useUrlState adds an array by @zhuleizhang in https://github.com/alibaba/hooks/pull/2790
- :wrench: Configuration Updates
- chore: Update development dependencies by @li-zhen-zhennnnnn in https://github.com/alibaba/hooks/pull/2802
- chore: Upgrade dependency versions and use nodejs v20,22 in CI by @ianzone in https://github.com/alibaba/hooks/pull/2800
- :bug: Bug Fixes
- fix: Fix the unknown type issue of createUseStorageState by @Meet-student in https://github.com/alibaba/hooks/pull/2795
- fix: Fix the problem that when useRequest starts more than two polling requests, if the page is set to hide to stop polling, and the page is redisplayed, some requests do not automatically start polling. by @JaxonJay in https://github.com/alibaba/hooks/pull/2688
- fix: Fix the timing competition issue of useInfiniteScroll by @duwenhan2byte in https://github.com/alibaba/hooks/pull/2786
- fix: Extract common functions for set operations by @maxiaokai1996 in https://github.com/alibaba/hooks/pull/2661
- fix: Fix the readyState judgment issue by @dongmucat in https://github.com/alibaba/hooks/pull/2705
- fix: Fix tsconfig issues by @ianzone in https://github.com/alibaba/hooks/pull/2805
- :art: Code Refactoring
- refactor(useTheme): Improve code readability by @w2xi in https://github.com/alibaba/hooks/pull/2803
- Refactor jest to vitest by 2814 by @Meet-student in https://github.com/alibaba/hooks/pull/2818
- :book: Documentation Fixes
- docs: Fix the useClickAway demo in React 19 by @li-jia-nan in https://github.com/alibaba/hooks/pull/2798
- docs: Fix the useFusionTable demo in React 19 by @li-jia-nan in https://github.com/alibaba/hooks/pull/2799
- :white_check_mark: Test Updates
- test(use-url-state): Use vitest for testing by @ianzone in https://github.com/alibaba/hooks/pull/2804
- test(createDeepCompareEffect): Use vitest for testing by @ianzone in https://github.com/alibaba/hooks/pull/2807
- test(createUpdateEffect): Use vitest for testing by @ianzone in https://github.com/alibaba/hooks/pull/2810
- test(useBoolean): Use vitest for testing by @ianzone in https://github.com/alibaba/hooks/pull/2813
- test(useStorageState): Use vitest for testing by @ianzone in https://github.com/alibaba/hooks/pull/2811
- test(useAsyncEffect): Use vitest for testing by @ianzone in https://github.com/alibaba/hooks/pull/2812
New Contributors
- @zhuleizhang made their first contribution in https://github.com/alibaba/hooks/pull/2790
- @li-zhen-zhennnnnn made their first contribution in https://github.com/alibaba/hooks/pull/2802
- @Meet-student made their first contribution in https://github.com/alibaba/hooks/pull/2795
- @w2xi made their first contribution in https://github.com/alibaba/hooks/pull/2803
- @iambimo24 made their first contribution in https://github.com/alibaba/hooks/pull/2713
- @JaxonJay made their first contribution in https://github.com/alibaba/hooks/pull/2688
- @duwenhan2byte made their first contribution in https://github.com/alibaba/hooks/pull/2786
- @maxiaokai1996 made their first contribution in https://github.com/alibaba/hooks/pull/2661
- @dongmucat made their first contribution in https://github.com/alibaba/hooks/pull/2705
Full Changelog: https://github.com/alibaba/hooks/compare/v3.9.0...v3.9.1