v1.5.0
🚀 Features
-
Add new Hook
useQuery
renamed fromuseRequest
- by @vikiboss (11f65) -
Add internal Hooks
useTrackedRefState
&useVersionedAction
- by @vikiboss (783fa) -
Add new Hook
useFirstRender
to check whether it's the first render. - by @vikiboss (aee59) -
useAsyncFn:
-
useClipboard:
-
useClipboardItems:
-
useLatest:
-
useLoadingSlowFn:
-
usePagination:
-
usePerformanceObserver:
-
usePrevious:
-
useQuery:
-
useRequest:
-
useWebObserver:
🐞 Bug Fixes
View changes on GitHub
🚀 功能
-
添加了新的 Hook
useQuery
,原名useRequest
- 由 @vikiboss 贡献 <samp>(11f65)</samp> -
添加了内部 Hooks
useTrackedRefState
和useVersionedAction
- 由 @vikiboss 贡献 <samp>(783fa)</samp> -
新增
useFirstRender
Hook 用于检查是否为首次渲染。- 由 @vikiboss 贡献 <samp>(aee59)</samp> -
useAsyncFn:
- 重写为使用自动跟踪状态以提高性能 - 由 @vikiboss 贡献 <samp>(3ec25)</samp>
-
useClipboard:
- 支持
onCopy
和onCopiedReset
回调 - 由 @vikiboss 贡献 <samp>(38718)</samp> - 重写为使用自动跟踪状态以提高性能 - 由 @vikiboss 贡献 <samp>(5ce34)</samp>
- 增强
legacyCopy
行为 - 由 @vikiboss 贡献 <samp>(bccfe)</samp>
- 支持
-
useClipboardItems:
- 支持
onCopy
和onCopiedReset
回调 - 由 @vikiboss 贡献 <samp>(0d1e7)</samp> - 重写为使用自动跟踪状态以提高性能 - 由 @vikiboss 贡献 <samp>(2d91a)</samp>
- 支持
-
useLatest:
- 减少不必要的赋值 - 由 @vikiboss 贡献 <samp>(3cad8)</samp>
-
useLoadingSlowFn:
- 重写为使用自动跟踪状态以提高性能 - 由 @vikiboss 贡献 <samp>(97226)</samp>
-
usePagination:
- 支持直接返回切片列表(在选项中传递
list
),并在返回值中添加indexStart
,indexEnd
- 由 @vikiboss 贡献 <samp>(2ed32)</samp>
- 支持直接返回切片列表(在选项中传递
-
usePerformanceObserver:
- 支持
entryTypes
检查 - 由 @vikiboss 贡献 <samp>(d9f39)</samp>
- 支持
-
usePrevious:
- 支持使用
deep
选项来深度比较上一个状态 - 由 @vikiboss 贡献 <samp>(204b4)</samp>
- 支持使用
-
useQuery:
- 重写为使用自动跟踪状态以提高性能 - 由 @vikiboss 贡献 <samp>(72adc)</samp>
- 支持
onErrorRetryFailed
选项 - 由 @vikiboss 贡献 <samp>(357e7)</samp>
-
useRequest:
- 弃用
useRequest
,请改用useQuery
。- 由 @vikiboss 贡献 <samp>(26c51)</samp>
- 弃用
-
useWebObserver:
- 对特定观察者支持额外的
supported
检查 - 由 @vikiboss 贡献 <samp>(d30a9)</samp>
- 对特定观察者支持额外的
🐞 修复
- useQuery: 修复全局 mutate 参数错误 - 由 @vikiboss 贡献 <samp>(3d35a)</samp>