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

useDebouncedCallback does not update state when react-dev-tools is open #129

Closed
alexniarchos opened this issue Mar 17, 2022 · 2 comments
Closed

Comments

@alexniarchos
Copy link

Describe the bug
When react-dev-tools are open and the component that uses the useDebouncedCallback method is focused in react-dev-tools then if the user calls the set state method of a useState hook the state will not update.

To Reproduce
Go to the example of useDebouncedCallback from the README, then open react-dev-tools and click on the "Input" component. Now if you change the value of the input field the state will not be updated
https://codesandbox.io/s/x0jvqrwyq

Expected behavior
If the above steps are followed then the state should be updated

use-debounce version: 7.0.1

@xnimorz
Copy link
Owner

xnimorz commented May 1, 2022

Hey @alexniarchos
Thanks for reporting!

I've published v8.0.0 of the library.

Now it fully compatible with react-devtools
If you get any issues during the update from 7.x.x => 8.x.x here is some guidance: https://github.com/xnimorz/use-debounce/blob/master/CHANGELOG.md#800

@xnimorz
Copy link
Owner

xnimorz commented May 1, 2022

I'm closing this issue as it should be resolved for now. Please, feel free to re-open it if you still get any issues with it

@xnimorz xnimorz closed this as completed May 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants