Hello, I have several problems with the . My currently biggest problem is, that the page always reloads, when I click an . Actually, I need an onClick handler on the . Its supposed to do something custom.
return(
<>
<div className="appMargin">
<Logo />
</div>
<IonTabs>
<IonRouterOutlet>
// some routes
</IonRouterOutlet>
<IonTabBar slot="bottom" color="primary">
<IonTabButton tab="bla" onClick={e => handleClick(e)}>
{platformBtn || <IonSpinner color="tertiary" />}
</IonTabButton>
</IonTabBar>
</IonTabs>
</>
)
This is the component. And this is the “handleClick” function:
const handleClick = e => {
e.stopImmediatePropagation();
e.preventDefault();
console.log('Hello');
}
The problem is, that even though I have the preventDefault() and the stopImmediatePropagation(), the site always reloads… Can someone help me there?