TouchableWithoutFeedback doesn't support styling on itself, which is odd as all other touchables do support styling. This leads to unexpected behaviour.
TouchableWithoutFeedback to take styles.
TouchableWithoutFeedback does not take in any styles.
Snack: https://snack.expo.io/BJHqfjpOf
Here you can see that the TouchableWithoutFeedback component doesn't get styled properly. It works when the styling is applied to the child View, but this isn't always desirable.
The TouchableOpacity on the other hand styles fine.
One reason to use TouchableWithoutFeedback for example would be a background overlay where you want to hide the overlay on pressing the background.
Currently you have to use TouchableOpacity with activeOpacity={1} to mimic the desired behaviour.
Thanks for posting this! It looks like your issue may be incomplete. Are all the fields required by the Issue Template filled out?
You may safely ignore this if you believe your issue contains all the relevant information. Thank you for your contributions.
This issue was marked as lacking information required by the issue template. There has been no activity on this issue for a while, so I will go ahead and close it.
If you found this thread after encountering the same issue in the latest release, please feel free to create a new issue with up-to-date information by clicking here.
If you are the author of this issue and you believe this issue was closed in error (i.e. you have edited your issue to ensure it meets the template requirements), please let us know.
@react-native-bot this issue contained enough information and a Snack.
Would be great if a team member could reply to this and open it up again, it's a real bug.
Faced same issue today, TouchableWithoutFeedback is the most important one of the Touchable components, i use it in the flatlist items.
It would be great to implement style prop for TouchableWithoutFeedback like the others (TouchableHighlight and TouchableOpacity).
Any thoughts on wrapping TouchableWithoutFeedback in a styled view vs wrapping a styled view in a TouchableWithoutFeedback?
@ysthedood Hey, you can make a View with your style under TouchableWithoutFeedback.
Most helpful comment
@react-native-bot this issue contained enough information and a Snack.
Would be great if a team member could reply to this and open it up again, it's a real bug.