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

useThrottleFn has bug #2383

Open
chenjianfang opened this issue Aug 31, 2022 · 1 comment · May be fixed by #2525
Open

useThrottleFn has bug #2383

chenjianfang opened this issue Aug 31, 2022 · 1 comment · May be fixed by #2525

Comments

@chenjianfang
Copy link

chenjianfang commented Aug 31, 2022

React 18 useEffect runs twice!

you need set in useThrottleFn function
useUnmount(function () { timeout.current && clearTimeout(timeout.current); timeout.current = undefined; });

@jemerald
Copy link

same as #2343

EnixCoda added a commit to EnixCoda/react-use that referenced this issue Oct 19, 2023
@EnixCoda EnixCoda linked a pull request Oct 19, 2023 that will close this issue
13 tasks
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

Successfully merging a pull request may close this issue.

2 participants