Skip to content
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

fix: rename useThrottleCallback and useDebounceCallback #130

Merged
merged 1 commit into from
Jun 16, 2021

Conversation

xobotyi
Copy link
Contributor

@xobotyi xobotyi commented Jun 16, 2021

What is the current behavior, and the steps to reproduce the issue?

useDebounceCallback and useThrottleCallback are not correctly named.

What is the expected behavior?

It should be useDebouncedCallback and useThrottledCallback

How does this PR fix the problem?

Renames tese hooks and ther import\use occurrences.

Checklist

  • Have you read contribution guideline?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Is there an existing issue for this PR?
  • Have the files been linted and formatted?
  • Have the docs been updated to match the changes in the PR?
  • Have the tests been updated to match the changes in the PR?
  • Have you run the tests locally to confirm they pass?

@xobotyi xobotyi requested a review from JoeDuncko June 16, 2021 07:33
resolves #129

BREAKING CHANGE:
`useDebounceCallback` renamed to `useDebouncedCallback`
`useThrottleCallback` renamed to `useThrottledCallback`
@codecov
Copy link

codecov bot commented Jun 16, 2021

Codecov Report

Merging #130 (2df9506) into master (a84b3a6) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #130   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           32        32           
  Lines          524       524           
  Branches        96        96           
=========================================
  Hits           524       524           
Impacted Files Coverage Δ
src/index.ts 100.00% <100.00%> (ø)
src/useDebouncedCallback/useDebouncedCallback.ts 100.00% <100.00%> (ø)
src/useThrottledCallback/useThrottledCallback.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a84b3a6...2df9506. Read the comment docs.

Copy link
Contributor

@JoeDuncko JoeDuncko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally agree with this change

@xobotyi xobotyi merged commit 77f66d7 into master Jun 16, 2021
@xobotyi xobotyi deleted the rename-hooks branch June 16, 2021 14:45
github-actions bot pushed a commit that referenced this pull request Jun 16, 2021
# [3.0.0](v2.2.0...v3.0.0) (2021-06-16)

### Bug Fixes

* rename useThrottleCallback and useDebounceCallback ([#130](#130)) ([77f66d7](77f66d7)), closes [#129](#129)

### Features

* add `maxWait` parameter to `useDebouncedCallback` hook ([#131](#131)) ([600baa8](600baa8))
* change args for `useThrottledCallback` and `useDebouncedCallback` ([#132](#132)) ([131d98e](131d98e))
* new hooks `useDebouncedEffect` and `useDebouncedState` ([#133](#133)) ([1d164ff](1d164ff))

### BREAKING CHANGES

* `delay` and `deps` arguments are swapped position for
`useThrottledCallback` and `useDebouncedCallback` hooks to be aligned
with `useCallback` signature.
* `useDebounceCallback` renamed to `useDebouncedCallback`
`useThrottleCallback` renamed to `useThrottledCallback`
@xobotyi
Copy link
Contributor Author

xobotyi commented Jun 16, 2021

🎉 This PR is included in version 3.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants