TouchableOpacity setOpacityTo is not a function
未关闭
还没有人认领这个 Issue。
Component: TouchableOpacity
Issue: Author Provided Repro
- 主要语言
- C++
- 星标
- 127k
- 派生
- 25.3k
- 平均合并
- 1 天 23 小时
- 30 天内合并 PR
- 4
描述
Originally reported in expo/expo#9026, I ran into the same problem so I'm re-reporting this here
Description
The setOpacityTo on TouchableOpacity is no longer available.
React Native version:
0.62.2
Expo CLI 3.20.3 environment info:
System:
OS: macOS Mojave 10.14.6
Shell: 5.3 - /bin/zsh
Binaries:
Node: 10.20.1 - /var/folders/qt/10542x9d2wbg0x93mmh1xsw00000gn/T/yarn--1593777562592-0.5909086070884821/node
Yarn: 1.22.4 - /var/folders/qt/10542x9d2wbg0x93mmh1xsw00000gn/T/yarn--1593777562592-0.5909086070884821/yarn
npm: 6.14.4 - ~/.asdf/installs/nodejs/10.20.1/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5791312
Xcode: 11.0/11A420a - /usr/bin/xcodebuild
npmPackages:
expo: ^38.0.0 => 38.0.4
react: 16.11.0 => 16.11.0
react-dom: 16.11.0 => 16.11.0
react-native: https://github.com/expo/react-native/archive/sdk-38.0.0.tar.gz => 0.62.2
react-native-web: ^0.12.0 => 0.12.3
react-navigation: ^4 => 4.3.9
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
- Create a reference to
TouchableOpacity - Try calling
setOpacityTo
Expected Results
Opacity of the element is changed
Actual Results
Fatal crash due to missing method
Snack, code example, screenshot, or link to a repository:
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从链接的 Snack 和 TouchableOpacity 实现开始,复现 React Native 0.62.2 中缺失的 setOpacityTo 调用。确认调用该方法会改变元素的不透明度且不会导致致命崩溃,然后在修改后再次验证复现结果。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- react-native
- 领域
- mobile
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100