How can I get real elment by node id? react-native

前端 未结 7 1464
被撕碎了的回忆
被撕碎了的回忆 2020-12-30 06:05

  CLOSE


_onPress(e) {
         


        
7条回答
  •  隐瞒了意图╮
    2020-12-30 07:06

    In react native v.0.51 you need this statement:

    import ReactNativeComponentTree from 'react-native/Libraries/Renderer/shims/ReactNativeComponentTree';
    ReactNativeComponentTree.getInstanceFromNode(e.target);
    

    and ._currentElement.props changed to .memoizedProps

提交回复
热议问题