Skip to Content
react-utilsgetReactElementRef

getReactElementRef

See source on Github

Returns the ref of a React element handling differences between React 19 and older versions. It will throw runtime error if the element is not a valid React element.

  • @param element - ReactElement
  • @returns Ref | null