Unsure how to use IonTab methods - Ionic 5 React

IonicTabs appears to have a method getSelected according to documentation:

However, I can’t find any way of accessing these methods.

I’ve tried unsuccessfully getting the IonTabs ref, and also getting tabs element from tabs change event handlers:

const Tabs = () => {
  const tabs = useRef();
  tabs.getSelected() // throws error

  return (
      onIonTabsWillChange={function () {
        this.getSelected() // throws error