What's Changed
-
🐛 Bug 修复
- 由 @linhf123 贡献,在 #2881 中为
useInfiniteScroll使用requestAnimationFrame来更新滚动位置。 - 由 @lvboda 贡献,在 #2866 中修复了
useRequest在ready=false时runAsync未立即返回的问题(无 pending 状态)。 - 由 @Arktomson 贡献,在 #2900 中为
useKeyPress添加了旧版 key 别名以提高兼容性。 - 由 @guaijie 贡献,在 #2884 中修复了
useRafInterval在执行函数内部调用clear无效的问题。 - 由 @li-jia-nan 贡献,在 #2912 中修复了相同 storage 状态导致重复渲染的问题。
- 由 @linhf123 贡献,在 #2881 中为
-
🛠️ 代码重构
- 由 @JunlinZhu-Tommy 贡献,在 #2887 中将
useUpdate中的useCallback替换为useMemoizedFn。 - 由 @li-jia-nan 贡献,在 #2868 中进行了代码优化。
- 由 @nghiepdev 贡献,在 #2859 中在
useIsomorphicLayoutEffect中使用noop替代useEffect。
- 由 @JunlinZhu-Tommy 贡献,在 #2887 中将
-
🔧 性能优化
- 由 @li-jia-nan 贡献,在 #2913 中进行了性能优化。
-
📖 文档更新
- 由 @huangkevin-apr 贡献,在 #2892 中为讨论组图片添加了
alt属性以提升可访问性。
- 由 @huangkevin-apr 贡献,在 #2892 中为讨论组图片添加了
-
🐛 Bug Fixes
- Contributed by @linhf123, used
requestAnimationFrameto update scroll position inuseInfiniteScrollin #2881. - Contributed by @lvboda, fixed the issue where
runAsyncdid not return immediately whenready=false(no pending) inuseRequestin #2866. - Contributed by @Arktomson, added legacy key aliases for compatibility in
useKeyPressin #2900. - Contributed by @guaijie, fixed the issue where calling
clearinside the execution function ofuseRafIntervaldid not take effect in #2884. - Contributed by @li-jia-nan, fixed unnecessary re-renders when the storage state remained the same in #2912.
- Contributed by @linhf123, used
-
🛠️ Code Refactoring
- Contributed by @JunlinZhu-Tommy, replaced
useCallbackwithuseMemoizedFninuseUpdatein #2887. - Contributed by @li-jia-nan, performed code optimizations in #2868.
- Contributed by @nghiepdev, used
noopinstead ofuseEffectinuseIsomorphicLayoutEffectin #2859.
- Contributed by @JunlinZhu-Tommy, replaced
-
🔧 Performance
- Contributed by @li-jia-nan, performed performance optimizations in #2913.
-
📖 Documentation Updates
- Contributed by @huangkevin-apr, added
altattributes to discussion group images for accessibility in #2892.
- Contributed by @huangkevin-apr, added
New Contributors
- @linhf123 made their first contribution in #2881
- @huangkevin-apr made their first contribution in #2892
- @lvboda made their first contribution in #2866
- @nghiepdev made their first contribution in #2859
- @JunlinZhu-Tommy made their first contribution in #2887
Full Changelog: v3.9.6...v3.9.7