useTabs
provides automatic binding for component Tabs, which can reduce the amount of repetitive code and improve the development experience.
Using this hooks behaves the same as if you had added React.useState
manually.
Control components with Hooks.
useTabs
type useTabs = (initialValue: string) => {
state: string
setState: Dispatch<SetStateAction<string>>
currentRef: MutableRefObject<string>
bindings: {
value: string
onChange: (val: string) => void
}
}