-
Notifications
You must be signed in to change notification settings - Fork 584
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 Bug In useDebouncedCallback Doesn't Consider Its Dependencies (#420) #426
Open
baradoner
wants to merge
3
commits into
antonioru:master
Choose a base branch
from
baradoner:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ntonioru#420) 🐛 Fix bug in useDebouncedCallback where dependencies were not considered (antonioru#420)
antonioru
approved these changes
Aug 30, 2024
Amazing work, thank you! @baradoner can you please update the version in the package.json from 5.0.2 to 5.0.3 so that it will automatically trigger a new release? |
Done.
בתאריך יום ו׳, 30 באוג׳ 2024 ב-17:26 מאת Rù ***@***.***
>:
… Amazing work, thank you!
@baradoner <https://github.com/baradoner> can you please update the
version in the package.json from 5.0.2 to 5.0.3 so that it will
automatically trigger a new release?
—
Reply to this email directly, view it on GitHub
<#426 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BCKGP5MGJF642PXIBJASMBLZUB6IJAVCNFSM6AAAAABLAT57YWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRRGQZTCOJRGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Update Version from 5.0.2 to 5.0.3
As |
I see. I'll fix it there too.
…On Thu, Nov 28, 2024, 18:38 Mathieu Mousnier ***@***.***> wrote:
As useThrottleCallback works exactly the same way, wouldn't be the right
place to do the same change over there also ?
—
Reply to this email directly, view it on GitHub
<#426 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BCKGP5J36DVFFF7EQ7IPTTL2C5BIXAVCNFSM6AAAAABLAT57YWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMBWGQ4DQMBQG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Done.
בתאריך יום ו׳, 29 בנוב׳ 2024 ב-9:33 מאת Avraham Bar Adon <
***@***.***>:
… I see. I'll fix it there too.
On Thu, Nov 28, 2024, 18:38 Mathieu Mousnier ***@***.***>
wrote:
> As useThrottleCallback works exactly the same way, wouldn't be the right
> place to do the same change over there also ?
>
> —
> Reply to this email directly, view it on GitHub
> <#426 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/BCKGP5J36DVFFF7EQ7IPTTL2C5BIXAVCNFSM6AAAAABLAT57YWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMBWGQ4DQMBQG4>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🐛 Fix Bug In useDebouncedCallback Doesn't Consider Its Dependencies (#420)
Description
This commit addresses an issue in the useDebouncedCallback hook where the dependencies were not properly taken into account. This bug caused the callback function to not update correctly when its dependencies changed. The fix ensures that the callback function is debounced and correctly re-evaluates its dependencies, improving the hook's reliability and performance.
Related Issue
useDebouncedCallback doesn't consider its dependencies #420
Motivation and Context
This change is required to ensure that the useDebouncedCallback hook functions as expected by properly considering its dependencies. Without this fix, users may encounter unexpected behavior where the callback does not update in response to changes in its dependencies, leading to potential bugs and inconsistencies in the application.
How Has This Been Tested?
Unit tests verified the callback re-evaluates its dependencies. All tests passed successfully.
Screenshots (if appropriate):