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

[BUG ] :: useAnimatedStyle reset style when screen refocus #7048

Open
chanphiromsok opened this issue Feb 19, 2025 · 3 comments
Open

[BUG ] :: useAnimatedStyle reset style when screen refocus #7048

chanphiromsok opened this issue Feb 19, 2025 · 3 comments
Labels
Missing info The user didn't precise the problem enough 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

@chanphiromsok
Copy link

chanphiromsok commented Feb 19, 2025

Description

freezeOnBlur Resets Animated View in Bottom Tab Navigator

Issue Description

When using freezeOnBlur with @react-navigation/bottom-tabs, animated views reset their styles when navigating away and back. However, this issue does not occur when using @react-navigation/native-stack.

Expected Behavior

  • The Purple Rectangle should maintain its animated position when returning to the "Home" tab.

Actual Behavior

  • The Purple Rectangle resets to its initial position.
  • However, when clicking on it, it jumps back to the animated position.
  • useSharedValue retains its value, meaning the animation state is preserved, but the view itself resets.
FreezeEnabled freezeOnBlur Disabled
FreezeEnabled freezeOnBlur Disabled

Steps to reproduce

  1. Enable freezeOnBlur.
  2. Drag the Purple Rectangle.
  3. Navigate to the "Contact" tab.
  4. Return to the "Home" tab.

Snack or a link to a repository

https://github.com/chanphiromsok/Repro-Issue

Reanimated version

3.16.7

React Native version

0.77

Platforms

iOS, Android

JavaScript runtime

Hermes

Workflow

Expo Dev Client

Architecture

Fabric (New Architecture)

Build type

Release app & dev bundle

Device

iOS simulator

Device model

Xiaomi Mi 10 Lite 5G And IOS Simulator 15Pro

Acknowledgements

Yes

@github-actions github-actions bot added the Missing info The user didn't precise the problem enough label Feb 19, 2025
Copy link

github-actions bot commented Feb 19, 2025

Hey! 👋

It looks like you've omitted a few important sections from the issue template.

Please complete Description section.

@github-actions github-actions bot added 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 labels Feb 19, 2025
@chanphiromsok
Copy link
Author

This happened only new Arch

@MatiPl01
Copy link
Member

Hey @chanphiromsok!

Thanks for reporting the issue. We got some similar issue reports regarding freeze and there is an ongoing work on fix to these problems. Hopefully, the issue will be fixed soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing info The user didn't precise the problem enough 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

No branches or pull requests

2 participants