# @cooks/use-tabs

> React Hook to update your document's tabs

Latest version **1.0.1** (published 2020-10-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install @cooks/use-tabs
pnpm add @cooks/use-tabs
yarn add @cooks/use-tabs
bun add @cooks/use-tabs
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-10-28 |
| First published | 2020-10-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Hyunkeun Park |
| Maintainers | hyunkeun |
| Keywords | react, hooks, title |

## Links

- npm: https://www.npmjs.com/package/@cooks/use-tabs
- Repository: https://github.com/hermes7308/cooks
- Homepage: https://github.com/hermes7308/cooks#readme
- Issues: https://github.com/hermes7308/cooks/issues
- npm.io page: https://npm.io/package/@cooks/use-tabs

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2020-10-28
- 1.0.0 — 2020-10-27

## README

# @cooks/use-tabs

React Hook to update your document's tabs
``` 
example) useTab.js

const content = [
    {
        tab: "Section 1",
        content: "I'm the content of Section 1"
    },
    {
        tab: "Section 2",
        content: "I'm the content of Section 2"
    },
];
const App = () => {
    const { contentItem, changeItem } = useTabs(0, content);
    return (
        <div className="App">
            {content.map((section, index) => {
                return <button key={index} onClick={() => changeItem(index)}>{section.tab}</button>
            })}
        <div>{contentItem.content}</div>
    </div>
    );
} 
```

---
_Source: https://npm.io/package/@cooks/use-tabs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
