Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: perform sync update when exiting animation#885

Open
asapach wants to merge 1 commit intoreactjs:master from
asapach:fix/animation
Open

fix: perform sync update when exiting animation #885
asapach wants to merge 1 commit intoreactjs:master from
asapach:fix/animation

Conversation

@asapach
Copy link

@asapach asapach commented Mar 20, 2023

When running in React 18 concurrent mode some state updates are batched, which results in inconsistent timing of events compared to the legacy mode. For example when using animations, after animationend event fires, the onExited event is not fired immediately, so there is a brief period of time when animation is finished and the styles are reset back to normal, which may cause a flash or a jump. One of these scenarios is described in #816.

This change makes sure that the updates are performed synchronously, in order to make sure that events fire consistently.

ilearnio and imAETHER reacted with thumbs up emoji sergei-startsev, sentience, and imAETHER reacted with eyes emoji
otomad added a commit to otomad/react-transition-group that referenced this pull request Apr 19, 2024
reactjs#885
When running in React 18 concurrent mode some state updates are batched, which results in inconsistent timing of events compared to the legacy mode. For example when using animations, after animationend event fires, the onExited event is not fired immediately, so there is a brief period of time when animation is finished and the styles are reset back to normal, which may cause a flash or a jump. One of these scenarios is described in reactjs#816.
This change makes sure that the updates are performed synchronously, in order to make sure that events fire consistently.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

Comments

AltStyle によって変換されたページ (->オリジナル) /