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 (
<IonTabs
ref={tabs}
onIonTabsWillChange={function () {
this.getSelected() // throws error
}}
>