Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
initTabBar = (tabBarEl) => {
if (!tabBarEl) return;
const tabBar = new MDCTabBar(tabBarEl);
tabBar.listen('MDCTabBar:activated', (evt) => {
const activeIndex = evt.detail.index;
this.setState({activeIndex});
});
}
initTabBar = (tabBarEl) => {
if (!tabBarEl) return;
this.tabBar = new MDCTabBar(tabBarEl);
};