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

chore(deps): update react to 17 #2905

Merged
merged 5 commits into from
Nov 8, 2023
Merged

chore(deps): update react to 17 #2905

merged 5 commits into from
Nov 8, 2023

Conversation

marcelgerber
Copy link
Member

We're a bit late to the party but here we go.

https://legacy.reactjs.org/blog/2020/10/20/react-v17.html

Because of the changes to event delegation, I had to introduce some e.stopPropagation calls.
These are necessary if:

  • An onClick handler or something causes a component to be mounted
  • That new component sets up something like a document.addEventListener("click", this.onDismiss) handler

In that case, the new handler would be called immediately using the same event, which is of course not what we would like to happen.

otherwise, with React 17's changes to event delegation, the event
handlers that the newly mounted components set up in `componentDidMount`
would fire immediately, immediately dismissing the component again
@marcelgerber marcelgerber changed the title chore(deps): update react chore(deps): update react to 17 Nov 7, 2023
@marcelgerber marcelgerber merged commit e9ca135 into master Nov 8, 2023
17 checks passed
@marcelgerber marcelgerber deleted the update-react-17 branch November 8, 2023 08:51
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.

1 participant