Skip to content
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

Can't animate boxShadow in RN 0.76+ #6687

Open
C0rren opened this issue Nov 11, 2024 · 1 comment · May be fixed by #6749
Open

Can't animate boxShadow in RN 0.76+ #6687

C0rren opened this issue Nov 11, 2024 · 1 comment · May be fixed by #6749
Assignees
Labels
Platform: Android This issue is specific to Android Platform: iOS This issue is specific to iOS Repro provided A reproduction with a snippet of code, snack or repo is provided

Comments

@C0rren
Copy link

C0rren commented Nov 11, 2024

Description

useAnimatedStyle does not seem to support boxShadow animations - a new feature in React Native 0.76+. When trying to animate box shadows, the shadows disappear as soon as any animation code runs in the hook.

Please note that my repro is very simple but there are many ways to make this bug happen. For example, you can literally run any reanimated interpolator that affects the shadow and the shadow will immediately disappear, you don't even need to return and use a value for the shadow.

Steps to reproduce

  1. Set up RN 0.76.1+ with react native reanimated
  2. Create an animated Pressable component with createAnimatedComponent
  3. create animated box shadow styles and do anything, maybe animate on click for example
  4. shadow disappears when button is pressed instead of being animated - and never returns

Snack or a link to a repository

https://github.com/C0rren/ReactNativeReanimatedIssue

Reanimated version

3.16.1

React Native version

0.76.1

Platforms

Android, iOS

JavaScript runtime

None

Workflow

None

Architecture

None

Build type

None

Device

Emulator (iPhone 16, iOS 18)

Device model

Emulator (iPhone 16, iOS 18)

Acknowledgements

Yes

@github-actions github-actions bot added Repro provided A reproduction with a snippet of code, snack or repo is provided Platform: Android This issue is specific to Android Platform: iOS This issue is specific to iOS labels Nov 11, 2024
@patrycjakalinska patrycjakalinska linked a pull request Nov 22, 2024 that will close this issue
@patrycjakalinska patrycjakalinska linked a pull request Nov 22, 2024 that will close this issue
@patrycjakalinska patrycjakalinska self-assigned this Nov 26, 2024
@patrycjakalinska
Copy link
Contributor

Hi @C0rren, thanks for raising the issue! I've prepared a PR that introduces boxShadow to the animations, and it should be ready shortly. If you have any questions, feel free to reach out c:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: Android This issue is specific to Android Platform: iOS This issue is specific to iOS Repro provided A reproduction with a snippet of code, snack or repo is provided
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants