import { Dispatch, MutableRefObject, SetStateAction } from 'react' import useCurrentState from '../utils/use-current-state' const useTabs = ( initialValue: string ): { state: string setState: Dispatch> currentRef: MutableRefObject bindings: { value: string onChange: (val: string) => void } } => { const [state, setState, currentRef] = useCurrentState(initialValue) return { state, setState, currentRef, bindings: { value: state, onChange: (val: string) => { setState(val) } } } } export default useTabs