关于 usePropsValue 的讨论 #6266
19Qingfeng
started this conversation in
General
Replies: 2 comments
-
两边可以逐步统一掉一些 hooks 和工具方法的使用。 |
Beta Was this translation helpful? Give feedback.
0 replies
-
当然欢迎 PR 啦~ |
Beta Was this translation helpful? Give feedback.
0 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.
-
关于
src/utils/use-props-value.ts
有些疑惑。我看 antd 和 rc 中关于受控/非受控的实现是使用
useMergedState
。就两种代码的实现方式来说,显然我认为 rc 中的方式比较 antd-mobile 中的更加优秀,这里并不是说代码风格和功能设计上。
而是针对受控组件这里显然会多一次 update 的渲染:
我知道这个问题并不是 Bug 同时也看起来有点吹毛求疵,不过还是想知道关于社区如何看待这种做法。或许我们可以将这种方式进行优化?我愿意为此提出一个 PR。
Beta Was this translation helpful? Give feedback.
All reactions