Repository navigation
refactor(useDebounce, useThrottle): reuse internal implementations for deprecated hooks - #613
Conversation
…r deprecated hooks - These hooks are deprecated but are still used internally
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v1-base #613 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 78 76 -2
Lines 2602 2447 -155
Branches 825 790 -35
==========================================
- Hits 2602 2447 -155 🚀 New features to boost your workflow:
|
hyesungoh
left a comment
There was a problem hiding this comment.
since the return type is written out now, DebouncedFunction doesn't need export. could you drop it (like ThrottledFunction) and use the written-out type in the spec? 🙏
- use an explicit inline type in the type test - remove the unnecessary export from DebouncedFunction
Overview
Refs: #590
Closes: #612
The hooks scheduled for removal duplicated internal implementations that will continue to be used. I removed this duplication by updating the deprecated public hooks to reuse the internal hooks.
Checklist
yarn run fixto format and lint the code and docs?yarn run test:coverageto make sure there is no uncovered line?