react中如何获取dom元素

react中如何获取dom元素_第1张图片

react中如何获取dom元素_第2张图片 

实现代码

 const inputRef = useRef(null)

 inputRef.current.focus()

你可能感兴趣的:(react.js,前端,javascript)