-
Notifications
You must be signed in to change notification settings - Fork 165
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
Animation is not smooth on Safari #26
Comments
Hey there. Is it actually dropping frames if you profile it in Safari? Be helpful to see a profile of the animation. Because you're not animating lots of elements (if I understand correctly) and it's just a few props it likely not a animation performance issue. There's some layout/recalc differences in Safari that can cause problems and be difficult to track down without looking at all the styles on the page. Wondering if you can put an example together on codesandbox that reproduces the issue. I think the above is pseudo code for demonstration, but just to be sure...all the style objects that are constant should be defined outside so they don't get created on each render. It creates a lot of extra objects. So like {flex:1, display: "flex"} in the nodes function and {width:200, height:500, backgroundColor: "red"} in the Column component. Also, are you looking at it in a production build of react? |
@sghall Thank you very much for the immediate feedback, We found the reason, it is actually our problem, since we add We move |
That's great. Glad you found the issue! Cheers. |
Problem or feature description
I got a list of columns to render, and hooked up react-move to do animation when a column is deleted. Only animating the
width
,marginLeft
andmarginRight
of the column, then when one column is deleted, the other will slide from right to left.It is very smooth on chrome and firefox, but not on safari, you can see the sluggish movements.
Steps to reproduce (only needed for problems)
And the
Column
is just like a box with fixed width, height.Versions (only needed for problems)
The text was updated successfully, but these errors were encountered: