navigation-rfc icon indicating copy to clipboard operation
navigation-rfc copied to clipboard

[Performance] Switch NavigationCard to animate with transforms

Open ide opened this issue 8 years ago • 5 comments

@kmagiera pointed out:

https://github.com/ericvicenti/navigation-rfc/blob/fc3d05e960239cd4180ee2878e1954ace38a556d/CustomComponents/NavigationCard.js#L104 where we animate right and left props (those require to run layout algorithm each frame and using translateX would be a better choice, not sure if possible to use it though)

ide avatar Jan 05 '16 21:01 ide

:cool:

brentvatne avatar Jan 05 '16 22:01 brentvatne

yeah, using translateX sounds like a better choice for NavigationCard

ericvicenti avatar Jan 05 '16 22:01 ericvicenti

Does translateX support Android too now?

VansonLeung avatar Jan 11 '16 02:01 VansonLeung

Yes, using transforms would be much better.

@vansonleung: translateX should work on Android, but I believe it requires the decomposed form:

  style={{
    transform: [
      {translateX: 200},
    ],
  }}

sahrens avatar Jan 12 '16 23:01 sahrens

Had to revert the transform switch because it breaks when debugging in chrome #30

ericvicenti avatar Jan 26 '16 20:01 ericvicenti