text: Title: Use new refs pattern instead of legacy string pattern
  Body: React 16 introduced a new pattern for refs, described [here](https://reactjs.org/docs/refs-and-the-dom.html) - we are using the string pattern, described in that doc as "legacy". It's probably not a concern until it will be deprecated in React 18 (or later?) but it could give us some performance gains. Making this issue just to note that we are using what is described as a "legacy api" instead of the latest preferred pattern.