react-native-reanimated
react-native-reanimated copied to clipboard
animatedProps with disabled not updating
Description
Using animatedProps to update a disabled prop never updates the value. Logging inside useAnimatedProps displays the correct values, but the changes don't seem to update the component.
- Initially, the first button is displayed as disabled.
- We can click the second and third button, which updates the styling correctly, but the
disabledstate remains on the first button (after clicking on third, I try to click “first” again in the video).
https://github.com/user-attachments/assets/1ed533e9-fa0e-4d26-a45e-c898e1c79ca7
Steps to reproduce
- Use
animatedPropsto setdisabledon a<Pressable>button that's been augmented usingAnimated.createAnimatedComponent. - The
disabledvalue never updates, even though the value changes inside theuseAnimatedPropshook.
Snack or a link to a repository
https://github.com/believer/rn-animated-props-disabled
Reanimated version
3.10.1
React Native version
0.74.5
Platforms
iOS
JavaScript runtime
None
Workflow
Expo Go
Architecture
None
Build type
None
Device
iOS simulator
Device model
No response
Acknowledgements
Yes