react,使用两个useRef,正确的写法是什么?

在使用的react版本如下:

img


已写的部分代码:

// ...
function Sticky(props) {
// 创建ref对象
  const placeholder = useRef()
  const content = useRef()
// ...
return (
      <div>
        {/* 占位元素 */}
        <div ref={placeholder} />
        {/* 内容元素 */}
        <div ref={content}>{props.children}div>
      div>
    )
// ...
}
// ...

请问useRef可否这样写?如不可,请问正确的写法是什么?

coutent.current 就可以使用了
参考这个
https://blog.csdn.net/hjc256/article/details/102587037