We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The current implementation contains this:
useEffect(() => { savedHandler.current = handler; }, [handler]);
Is there any reason this has to be in a useEffect()? I would just do:
useEffect()
savedHandler.current = handler;
I would think that would be quicker to just store handler every time than having useEffect() check to see if it's changed.
handler
Or am I missing something?
The text was updated successfully, but these errors were encountered:
Its inside an effect because will happen only when handler changes.
Sorry, something went wrong.
No branches or pull requests
The current implementation contains this:
Is there any reason this has to be in a
useEffect()
? I would just do:savedHandler.current = handler;
I would think that would be quicker to just store
handler
every time than havinguseEffect()
check to see if it's changed.Or am I missing something?
The text was updated successfully, but these errors were encountered: