Replies: 3 comments 2 replies
-
转 @crazylxr 的建议:
有了这个 useSize 是不是可以不需要了
手势相关的我想把缩放,旋转这些也加进来,加个 usePinch、useRotate
这个可以改一下,我的想法是加一个 usePromise 的 hook,这里面有更多的基于 promise 扩展的,比如 超时、队列,promisify 等逻辑。 添加 useFPS。 |
Beta Was this translation helpful? Give feedback.
0 replies
-
感觉v4 是不是还有点遥遥无期 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
预期目标
/packages/hooks/src/utils/tests
下引入才能测严格模式,而目前大部分是直接从@testing-library/react
引的)useRequest
问题修复 🐛
Scene
对应 PR(以下 PR 都处理了 useVirtualList里的overscan属性设置为0时,第一条数据不会渲染 #1538 需要再次确认,采用哪个 PR 的方案或综合考虑):
T
不能为对象):useSelections当defaultSelected是数组对象的时候checkbox无法选中 #1105State
Effect
wait
参数默认值取值逻辑调整,以支持底层节流防抖的实现细节:feat(useThrottleFn/useDebounceFn): support requestAnimationFrame #2332Dom
功能增强 ✨
Scene
isInverse
参数,控制滚动方向 feat(useInfiniteScroll): using useInfiniteScroll with isInverse prop #2315batchRemove
批量移除的方法 feat(useDynamicList): addbatchRemove
method #2340binaryType
参数:feat(useWebSocket): add 'binaryType' parameter #1941State
key
相同的useSession/LocalStorageState
会同步状态,包括同一浏览器不同 Tab 之间:feat(useStoage): listen tostorage
event #2298fix(useStorageState): default value is not stored #2064- storage
fix(useCookieState): default value is not stored #2098- cookie
Dom
target
数组也允许触发回调:feat(useClickAway): allow falsy target #1953key
方案:fix(useKeyPress): make alias of keyCode more compatible #2054options
support #2227Advanced
options.safe
参数),组件卸载后不再执行异步回调中的状态变化 feat(useReactive): 添加 safe 机制,组件卸载后不再执行异步回调中的状态变化 #1494性能提升 🚀
Scene
新 Hook ✨
Scene
postMessage
API,支持跨文档通信 feat: usePostMessage #1977Effect
createDeepCompareHook
,再把深比较的 hook 都删了:feat: useDeepCompareMemo #1972Dom
getBoundingClientRect
API,支持页面 resize、scroll 时更新 feat: add new hook "useBounding" #2063文档 📝
杂项 🛠
decode-uri-component
版本:chore: bump query-string to ^8.1.0 and update jest config #2319未分类(待确认是否需要处理或支持)
Scene
usePagination
cache cannot use current page to cache pages #2200socketUrl
参数支持数组:useWebSocket 优化提议 #2187State
Effect
Dom
useDrop
child trigger avoidance does not work reliably #2036待分类
其他项目引入的问题
Dom
其他
竞品参考
react-use(不再维护,且有很多打破 ref 规则的用法,慎重参考)总结
人员分工:
Beta Was this translation helpful? Give feedback.
All reactions