# use-toc

> ReactJs custom-hook for generating table-of-content data.

Latest version **0.1.0** (published 2021-06-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install use-toc
pnpm add use-toc
yarn add use-toc
bun add use-toc
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2021-06-12 |
| First published | 2021-06-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 2.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | or-yam, |
| Maintainers | or-yam |
| Keywords | react-toc, toc, useToc, use-toc, table of content |

## Links

- npm: https://www.npmjs.com/package/use-toc
- Repository: https://github.com/webiya/useToc
- Homepage: https://github.com/webiya/useToc#readme
- Issues: https://github.com/webiya/useToc/issues
- npm.io page: https://npm.io/package/use-toc

## Dependencies (1)

- [react](https://npm.io/package/react.md) ^17.0.2

## Alternatives

- [@lexical/table](https://npm.io/package/@lexical/table.md) — 3.0M weekly downloads
- [mantine-datatable](https://npm.io/package/mantine-datatable.md) — 98.2K weekly downloads
- [react-native-collapsible-tab-view](https://npm.io/package/react-native-collapsible-tab-view.md) — 70.6K weekly downloads
- [@handsontable/vue3](https://npm.io/package/@handsontable/vue3.md) — 16.1K weekly downloads
- [vuewordcloud](https://npm.io/package/vuewordcloud.md) — 7.2K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2021-06-12

## README

# useToc

Create easy to use data for building table of content for you react component.

## Installation

```sh
npm i use-toc
```

or

```sh
yarn add use-toc
```

## Usage Example

```javascript
import Toc from ".components/Toc";
import useToc from 'use-toc';

export default function App() {
  const toc = usesToc(".container h3");

  return (
    <div className="App">
      <Toc tocData={toc} />
      // ...
  )
}

```

---

### Demo

[Sand Box](https://codesandbox.io/s/cold-rgb-65f06?file=/src/Toc.js)

---

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