Assign animated style to more than one element?
See original GitHub issueWith @JonnyBurger we had a discussion today where we were wondering if we could assign a style to more than one element? We have styles for animations that we have to duplicate everywhere. Currently, we factorize these into useDerivedValue but it’s only the values, not the properties.
If this would be possible, it would also make sense for animatedProps to support an array:
animatedProps={[strokeAnimation, rotateAnimation]}
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Apply multiple animation effects to one object - Microsoft Support
Open the Animation Pane. Select the object on the slide that you want to animate. On the Animations tab, click Animation Pane. Open...
Read more >React Native Animated Multiple Animations on one element
You use a single animated value. this.expandAndShrinkAnimation = new Animated.Value(50); Animated.
Read more >How to achieve multiple css animations on one element?
For some reason I cannot get this code to work. I'm trying to rotate this object 360 degrees (which works fine) AND change...
Read more >Using Multi-Step Animations and Transitions - CSS-Tricks
CSS animations are rad and the concept is fairly simple. Name the animation, define the movement in @keyframes and then call that animation...
Read more >Animating Many Elements and the Animate Method | kirupa.com
Animating multiple elements using the animate method is scarily very similar to animating just a single element using the animate method. To cut ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can extract the callback here and pass it multiple times to each useAnimatedStyle, as a workaround
Don’t forget to mark it as worklet
It’s been discussed before we postponed implementing this having difficulties coming from shared value being async. However we might get back to this in the future.
As for the props if you really need this, feel free to open an issue with feature request.