-
Notifications
You must be signed in to change notification settings - Fork 25k
Closed
Labels
Needs: AttentionIssues where the author has responded to feedback.Issues where the author has responded to feedback.
Description
Description
Assigning a dynamic value to opacity in TouchableOpacity like
opacity:this.state.opacity?1:0.1
the TouchableOpacity will not properly react to state change i.e. if the button is pressed twice the opacity will change
WhatsApp.Video.2021-10-26.at.9.15.25.PM.mp4
Actual behaviour: opacity changes when the button is pressed twice.
Expected behviour: opacity should change when the button is pressed in the first time
Version
0.66.1
Output of react-native info
Steps to reproduce
-
Make a state for eg: active: true.
-
set the opacity value of TouchableOpacity as
opacity:this.state.opacity?1:0.1and change the active state value to false
when TouchableOpacity is pressed.
3)When the active state changes from true to false the opacity value of TouchableOpacity wont change.
4)Pressing TouchableOpacity second time will change the opacity value.
Snack, code example, screenshot, or link to a repository
hetanthakkar
Metadata
Metadata
Assignees
Labels
Needs: AttentionIssues where the author has responded to feedback.Issues where the author has responded to feedback.
