TouchableHighlight breaks ref property on his children
See original GitHub issueTouchableHighlight breaks his children ref property:
<TouchableHighlight>
<View ref={()=>{ console.log(`This will not be called.`); }}
</TouchableHighlight>
However, TouchableWithoutFeedback works fine:
<TouchableWithoutFeedback>
<View ref={()=>{ console.log(`But this will!`); }}
</TouchableWithoutFeedback>
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
React Native TouchableHighlight : get component and context
The ref prop takes a callback for that very reason. You can use the callback to assign your child components to an object...
Read more >TouchableHighlight - React Native
The underlay comes from wrapping the child in a new View, which can affect layout, and sometimes cause unwanted visual artifacts if not...
Read more >The beginners guide to React Native and Firebase
This means that if a child property is different from the last state, it will be re-rendered with the new value. This is...
Read more >4. Components for Mobile - Learning React Native, 2nd ...
In doing so, we touched upon the basics of building interfaces with React ... we apply images via CSS, such as when we...
Read more >react-native-swipe-list-view-fix - npm
If your row is touchable (TouchableOpacity, TouchableHighlight, etc.) with an onPress function make sure renderItem returns the Touchable as the ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Closing this issue because it has been inactive for a while. If you think it should still be opened let us know why.
@hramos I don’t understand what’s the point of closing a valid bug report. It’s still an unfixed and fairly annoying bug, and closing it will make sure people don’t see it if anyone decide to contribute to react-native