useDebouncedCallback does not update state when react-dev-tools is open
Closed this issue · 2 comments
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
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
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