`shadowOffset` is reset when an `Animated.View` is animated
See original GitHub issueIs this a bug report?
Yes.
Have you read the Bugs section of the Contributing to React Native Guide?
Yes.
Environment
iOS, and on snack.expo.io
- Target Platform (e.g. iOS, Android): iOS
- Development Operating System (e.g. macOS Sierra, Windows 10): macOS Sierra
- Build tools (Xcode or Android Studio version, iOS or Android SDK version, if relevant): Xcode, snack.expo.io
Steps to Reproduce
- Render an
Animated.View
with a shadow andshadowOffset
(eg.{width: 10, height: 10}
) - Animate any transform with an
Animated.Value
- Observe
shadowOffset
is affected. (shadowOpacity
, andshadowRadius
are unaffected)
https://snack.expo.io/rkBBhJ3Nb
Expected Behavior
shadowOffset
should persist
Actual Behavior
shadowOffset
does not persist
Reproducible Demo
https://snack.expo.io/rkBBhJ3Nb
Note: none of the shadow properties are being animated.
A way to fix this is to wrap the styled-shadowed View
with an Animated.View
and animate that instead.
@janicduplessis any thoughts?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:12
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Issue in React Native shadow animation on panresponder
I want to apply animation in shadow like when user try to scroll down at that time shadow should be show dark when...
Read more >Create frame animations in Photoshop - Adobe Support
Select one or more frames in the Timeline panel. Click the Delay value below the selected frame to view the pop‑up menu.
Read more >Using the Animation view - Unity - Manual
Use the Animation view to preview and edit Animation Clips for animated GameObjects in Unity. To open the Animation view in Unity, go...
Read more >animation-direction - CSS: Cascading Style Sheets | MDN
In other words, each time the animation cycles, the animation will reset to the beginning state and start over again.
Read more >Animating Scenes - SketchUp Help
With SketchUp's animation feature, you can watch the shadow transition from ... To customize the animation, select View > Animation > Settings or...
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
Both those workarounds are great. But there’s still a bug
Another solution to this is wrapping the content of the Animatable into another View and applying the shadowOffset to it. https://github.com/oblador/react-native-animatable/issues/133