-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Animated] Animated.View component loses shadow on animation #16870
Comments
I had a similar problem with the
|
I was hopeful but alas, this seems not to solve my problem :( |
Ahh, that's unfortunate. Instead of |
Same deal, unfortunately - setValue certainly does its thing but the shadow disappears until the next time the component fully re-renders |
So if you stored the animation in the component state a change to its value, would trigger a re-render. A temporary solution, but I guess having |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions. |
Is this a bug report?
Yes (I think!)
Have you read the Contributing Guidelines?
Yes
Environment
Environment:
OS: macOS High Sierra 10.13.1
Node: 8.9.0
Yarn: 1.2.1
npm: 5.5.1
Watchman: Not Found
Xcode: Xcode 9.1 Build version 9B55
Android Studio: Not Found
Packages: (wanted => installed)
react: 16.0.0-beta.5 => 16.0.0-beta.5
react-native: 0.49.1 => 0.49.1
Target Platform: iOS (8)
Steps to Reproduce
Initialize new react-native project, import Animated and TouchableWithoutOpacity
Create simple Animated function - in my case:
along with interpolation such as:
Create an Animated.View component with style props that include an animated
{transform: { scale: bounceScale}}
as well as shadow (offset and opacity) style props.Place the above Animated.View component inside a TouchableWithoutOpacity component and set
onPress={this.bounce}
Expected Behavior
Animated.View component would, onPress, animate according to the bounce function leaving all other style props intact
Actual Behavior
Bounce function completes and removes shadow props:
Reproducible Demo
Snack demo: https://snack.expo.io/BkmcUs3yf
The text was updated successfully, but these errors were encountered: