TouchableOpacity setOpacityTo is not a function
Open
Nobody has claimed this yet.
Component: TouchableOpacity
Issue: Author Provided Repro
- Dominant language
- C++
- Stars
- 127k
- Forks
- 25.3k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 4
Description
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:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Snack and the TouchableOpacity implementation to reproduce the missing setOpacityTo call on React Native 0.62.2. Confirm that calling the method changes the element opacity without a fatal crash, then verify the reproduction after the change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100