Touchable native feedback is not working and issue with child elements style update also
还没有人认领这个 Issue。
- 主要语言
- C++
- 星标
- 127k
- 派生
- 25.3k
- 平均合并
- 1 天 23 小时
- 30 天内合并 PR
- 4
描述
Description
In recent react native the touchable native feedback component ripple effect is not working
Broken on
react-native: "0.80.1" & "0.81.4" (Without expo)
and
expo: "54"
Also child elements doesn't reflect changes in styles due to state change (Issue is in Android only)
Steps to reproduce
https://snack.expo.dev/@deepktp/touchablenativefeedback-android-component-example
and make sure to choose expo 54
-
Tap on first card (this is example from official documents of react native ) or the second card (new created) the ripple effect will not work then switch back to expo 53 and ripple effect will work
-
press on second card the text and text color changes with state update but background color of view component doesn't change in expo 54 but in expo 53 it works perfectly.
React Native Version
0.81.4
Affected Platforms
Runtime - Android
Output of npx @react-native-community/cli info
System:
OS: macOS 15.5
CPU: (8) arm64 Apple M1
Memory: 124.13 MB / 8.00 GB
Shell:
version: 3.2.57
path: /bin/sh
Binaries:
Node:
version: 22.15.0
path: /usr/local/bin/node
Yarn:
version: 4.1.1
path: /usr/local/bin/yarn
npm:
version: 10.9.2
path: /usr/local/bin/npm
Watchman: Not Found
Managers:
CocoaPods: Not Found
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.5
- iOS 18.5
- macOS 15.5
- tvOS 18.5
- visionOS 2.5
- watchOS 11.5
Android SDK: Not Found
IDEs:
Android Studio: 2024.3 AI-243.25659.59.2432.13423653
Xcode:
version: 16.4/16F6
path: /usr/bin/xcodebuild
Languages:
Java:
version: 20.0.2
path: /usr/bin/javac
Ruby:
version: 3.4.3
path: /opt/homebrew/opt/ruby/bin/ruby
npmPackages:
"@react-native-community/cli":
installed: 20.0.0
wanted: 20.0.0
react:
installed: 19.1.0
wanted: 19.1.0
react-native:
installed: 0.81.4
wanted: ^0.81.4
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true
Stacktrace or Logs
.
MANDATORY Reproducer
https://snack.expo.dev/@deepktp/touchablenativefeedback-android-component-example
Screenshots and Videos
No response
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 Android 上必需的 Snack 复现用例开始,并使用报告中的 React Native 版本 0.80.1 和 0.81.4,对比其在 Expo 53 和 Expo 54 下的行为。当 TouchableNativeFeedback 的 ripple 效果正常工作,并且子 view 的背景样式在 Android 上经过状态变更后能够更新时,该 issue 即完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- react-native
- 领域
- mobile
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100