Last updated 5 years ago
Was this helpful?
原文链接 :
在react 中操作真实的dom 元素 ,可以到 ref(refrence) 属性,它既可以用在 react 的组件 上,即获取的是组件的实例,获取实例的dom 节点,可以用 ReactDom.findDOMNode( refs ) 也可以用在 html元素上,即获取的是dom节点。