At Vimeo we’re big fans of React, which renders our front-end components in a modular and reusable fashion. React’s ref attribute is used to access components’ children or DOM elements. We normally use ref with React’s provided Higher Order Component (HOC) forwardRef and the useRef hook, but it can be confusing to share the ref attribute when using both of these methods at the same time. This post
![Handling internal and external refs to the same element with useImperativeHandle in React](https://cdn-ak-scissors.b.st-hatena.com/image/square/0e3bafcccb5290ba93429e7872f365cbe9ed29dd/height=288;version=1;width=512/https%3A%2F%2Fmiro.medium.com%2Fv2%2Fresize%3Afit%3A708%2F1%2AjY1Q-Ceatoj5sNwieFVCqA.png)