-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
LayoutAnimation singleton generates "Warning: Overriding previous layout animation" when multiple components animate at once. #12663
Comments
We're cutting down on the number of outstanding issues, in order to allow us to focus. I'm closing this issue because it has been open for over 60 days with no activity. If you think it should still be opened let us know why. PRs are always welcome. |
This would be a valuable enhancement. The ability to perform animations on more than one object at a time is common and necessary to rich UI. Vote to reopen this issue. |
@peacechen Is it possible for you to do PR of your solution? :) We have same issue when using |
@henrikra same here (using Any fix on this one? |
@henrikra Unfortunately I don't have a PR. This seems like it would be a major change deep in the RN code. I'm not familiar enough with the architecture of the animation engine and FB would not likely accept it (I've submitted PRs much smaller that haven't been accepted) |
Any update on this issue? Please open this issue, I think it is an important issue, Or please suggest some workaround for this. |
This is still a problem, +1 on reopen @hramos |
+1 on reopen, still getting tons of warnings for this. |
Please submit a new issue, this has been closed for almost a year. |
Description
LayoutAnimation can not deal with multiple components animating at once. The console has the message:
Reproduction
Component A does
Component B also does similarly:
If A and B's state change at the same time (or rather when React resolves their new states), the warning message appears and B's animation is overridden by A's configuration (or vice versa depending on timing).
Solution
LayoutAnimation would be more flexible as an instance instead of a singleton. For example:
myLayoutAnim = new LayoutAnimation(this.state);
This would allow each component's LayoutAnimation to operate independently of any others.
Additional Information
The text was updated successfully, but these errors were encountered: