New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: refactor fn #244
feat: refactor fn #244
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov Report
@@ Coverage Diff @@
## master #244 +/- ##
==========================================
- Coverage 73.97% 73.58% -0.40%
==========================================
Files 3 3
Lines 392 371 -21
Branches 160 159 -1
==========================================
- Hits 290 273 -17
+ Misses 102 98 -4
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
const maskDom = useRef<HTMLDivElement>(null); | ||
const handlerDom = useRef<HTMLDivElement>(null); | ||
const drawerId = useRef<string>(); | ||
const startPos = useRef<Point>(null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm...这些 useRef 可以改成 useState 不?纯改成 useRef 就没有 FC 的优势了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
目前单纯改写法, 看看后面用 rc-motion 重构还需不需要这些变量吧
}; | ||
const childProps = omit({ ...defaultProps, ...props }, [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个需要挪到上面去,props 本身就通过解构合并起来。否则重构很容易采坑
No description provided.