Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Blog - Background color is not supported by the native driver
Summary: This was a lie, background color is not supported (yet). Sorry for the false hopes :) Fixes #14178 Closes #15013 Differential Revision: D5424676 Pulled By: hramos fbshipit-source-id: ea592bf633f1632c931a9f18fe2fa9ebad6136be
- Loading branch information
ccb4e67
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@janicduplessis great work.
One question. Usually on web is better to animate elements with translate than with position.
It seems similar on react native where we can achieve the same effect of position change with a transform translate.
However my question is: it seems too simple that it feels there is a catch :) Is there a catch? eg. transform translate a view will not support something.
ccb4e67
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For position based animation it can pretty much always be replaced by a translate transform, the only thing that is ususally harder to do with transforms is animating things like height or width. In those cases it is usually easier to use something like LayoutAnimation.
ccb4e67
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @janicduplessis I wonder if https://aerotwist.com/blog/flip-your-animations/ can be applied also in react native context.
ccb4e67
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be possible to apply a technique similar to that, the only thing that makes it a bit harder is that getting the layout of a view is async.