Skip to content
Discussion options

You must be logged in to vote

Hey!

There is currently no way to combine styles from the transform property. This is quite rare use case and for now we suggest adding animated styles with transforms to separate views if possible.

If you can, please change your code to include all transforms in a single animated style or apply these
animated styles to separate components, such as:

export function Component(props) {
  const animatedStylesOne = useAnimatedStyle(() => ({
    transform: [{ rotateZ: `${rotationDegree.value}deg` }],
  }));

  const animatedStylesTwo = useAnimatedStyle(() => ({
    transform: [{ scale: scaleValue.value }],
  }));

  return (
    <Animated.View style={animatedStylesOne}>
      <AnimatedPressable 

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by MatiPl01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants