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

Update hooks-extra-no-direct-set-state-in-use-effect.mdx #831

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

neovov
Copy link
Contributor

@neovov neovov commented Oct 2, 2024

Fix an issue with addEventListener.
In the useEffect cleaning function, we need to use the same handler reference when calling removeEventListener otherwise it won't do anything.

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Docs
  • New Binding issue #___
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes, and the changes were approved in issue #___
  • No

Checklist

  • When resolving issues, they are referenced in the PR's title (e.g fix: remove a typo, closes #___, #___)
  • I have added a convincing reason for adding this feature, if necessary

Other information

Fix an issue with `addEventListener`.
In the useEffect cleaning function, we need to use the same handler reference when calling `removeEventListener` otherwise it won't do anything.

Signed-off-by: Nicolas Le Gall <neovov@users.noreply.github.com>
Copy link

vercel bot commented Oct 2, 2024

@neovov is attempting to deploy a commit to the Rel1cx's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Rel1cx Rel1cx merged commit d03bfec into Rel1cx:main Oct 2, 2024
1 check failed
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 this pull request may close these issues.

2 participants