【发布时间】:2021-07-26 14:13:21
【问题描述】:
我正在尝试获取视图的引用以确定触摸是来自视图还是视图之外
<View ref={ref => { console.log("ref is",ref) }}></View>
我指的是https://www.jaygould.co.uk/2019-05-09-detecting-tap-outside-element-react-native/ 但是这个参考总是空的。我做错了什么?如何获取元素的引用?
【问题讨论】:
标签: react-native