static copyPropsToState(props, state, focus = false) {
    const newState = {
      focus,
    };

    if (Tabs.inUncontrolledMode(props)) {
      const maxTabIndex = getTabsCount(props.children) - 1;
      let selectedIndex = null;

      if (state.selectedIndex != null) {
        selectedIndex = Math.min(state.selectedIndex, maxTabIndex);
      } else {
        selectedIndex = props.defaultIndex || 0;
      }
      newState.selectedIndex = selectedIndex;
    }

    return newState;
  }
// If the state has not selectedIndex, default to the defaultIndex or 0
If the state has not selectedIndex, default to the defaultIndex or 0
If the state has not selectedIndex default to the defaultIndex or 0
static copyPropsToState(props, state, focus = false) {
    const newState = {
      focus,
    };
    if (Tabs.inUncontrolledMode(props)) {
      const maxTabIndex = getTabsCount(props.children) - 1;
      let selectedIndex = null;
      if (state.selectedIndex != null) {
        selectedIndex = Math.min(state.selectedIndex, maxTabIndex);
      } else {
        selectedIndex = props.defaultIndex || 0;
      }
      newState.selectedIndex = selectedIndex;
    }
    return newState;
  }
static copyPropsToState ( props , state , focus = false ) { const newState = { focus , } ; if ( Tabs . inUncontrolledMode ( props ) ) { const maxTabIndex = getTabsCount ( props . children ) - 1 ; let selectedIndex = null ; if ( state . selectedIndex != null ) { selectedIndex = Math . min ( state . selectedIndex , maxTabIndex ) ; } else { selectedIndex = props . defaultIndex || 0 ; } newState . selectedIndex = selectedIndex ; } return newState ; }
If the state has not selectedIndex, default to the defaultIndex or 0
If the state has not selectedIndex default to the defaultIndex or 0