MCPcopy
hub / github.com/juliencrn/usehooks-ts

github.com/juliencrn/usehooks-ts @3.1.1 sqlite

repository ↗ · DeepWiki ↗ · release 3.1.1 ↗
207 symbols 585 edges 192 files 2 documented · 1%
README

usehooks-ts banner

usehooks-ts

React hook library, ready to use, written in Typescript.

Contributor Covenant NPM Downloads NPM Downloads License npm bundle size npm All Contributors

npm i usehooks-ts

Created by Julien Caron and maintained with ❤️ by an amazing team of developers.

💫 Introduction

useHooks(🔥).ts is a React hooks library, written in Typescript and easy to use. It provides a set of hooks that enables you to build your React applications faster. The hooks are built upon the principles of DRY (Don't Repeat Yourself). There are hooks for most common use cases you might need.

The library is designed to be as minimal as possible. It is fully tree-shakable (using the ESM version), meaning that you only import the hooks you need, and the rest will be removed from your bundle making the cost of using this library negligible. Most hooks are extensively tested and are being used in production environments.

Usage example

import { useLocalStorage } from 'usehooks-ts'

function Component() {
  const [value, setValue] = useLocalStorage('my-localStorage-key', 0)

  // ...
}

🪝 Available Hooks

💚 Backers

Big thanks go to all our backers! [Become a backer]

Sentry Sentry KATT KATT Adhi Ravishankar Adhi Ravishankar great-work-told-is great-work-told-is

✨ Contributors

Big thanks go to all our contributors! [Become a contributor]

Julien Julien 🖋 💻 🎨 🤔 a777med a777med 💻 Nguyen Tien Dat Nguyen Tien Dat 💻 Elias Cohenca Elias Cohenca 🖋 João Deroldo João Deroldo 🐛 💻 Nishit Nishit 💻 Jon Koops Jon Koops 💻
LoneRifle LoneRifle 💻 Viktor Viktor 🤔 🐛 Bruno Clermont Bruno Clermont 💬 yoannesbourg yoannesbourg 🤔 Strange2x Strange2x 🤔 Jason Pickens Jason Pickens 🐛 Sel-Vin Kuik Sel-Vin Kuik

Extension points exported contracts — how you extend this code

WindowEventMap (Interface)
(no doc)
packages/usehooks-ts/src/useEventListener/useEventListener.test.ts
HTMLElementEventMap (Interface)
(no doc)
packages/usehooks-ts/src/useEventListener/useEventListener.test.ts
SVGElementEventMap (Interface)
(no doc)
packages/usehooks-ts/src/useEventListener/useEventListener.test.ts
DocumentEventMap (Interface)
(no doc)
packages/usehooks-ts/src/useEventListener/useEventListener.test.ts
WindowEventMap (Interface)
(no doc)
packages/usehooks-ts/src/useLocalStorage/useLocalStorage.ts

Core symbols most depended-on inside this repo

cn
called by 61
apps/www/src/lib/utils.ts
useLocalStorage
called by 25
packages/usehooks-ts/src/useLocalStorage/useLocalStorage.ts
getItem
called by 24
packages/usehooks-ts/tests/mocks.ts
useEventListener
called by 23
packages/usehooks-ts/src/useEventListener/useEventListener.ts
useSessionStorage
called by 22
packages/usehooks-ts/src/useSessionStorage/useSessionStorage.ts
useScrollLock
called by 12
packages/usehooks-ts/src/useScrollLock/useScrollLock.ts
useBoolean
called by 12
packages/usehooks-ts/src/useBoolean/useBoolean.ts
mockMatchMedia
called by 12
packages/usehooks-ts/tests/mocks.ts

Shape

Function 195
Interface 6
Method 4
Class 2

Languages

TypeScript100%

Modules by API surface

packages/usehooks-ts/tests/mocks.ts8 symbols
scripts/utils/data-transform.js7 symbols
apps/www/src/components/doc-search/footer.tsx7 symbols
apps/www/src/components/ui/components.tsx6 symbols
apps/www/src/app/(docs)/react-hook/[slug]/page.tsx6 symbols
scripts/utils/get-markdown-data.js5 symbols
packages/usehooks-ts/src/useMap/useMap.demo.tsx5 symbols
packages/usehooks-ts/src/useScript/useScript.ts4 symbols
packages/usehooks-ts/src/useIsMounted/useIsMounted.demo.tsx4 symbols
packages/usehooks-ts/src/useEventListener/useEventListener.test.ts4 symbols
packages/usehooks-ts/src/useEventListener/useEventListener.demo.tsx4 symbols
apps/www/src/components/doc-search/modal.context.tsx4 symbols

Dependencies from manifests, versioned

@changesets/cli2.27.1 · 1×
@juggle/resize-observer3.4.0 · 1×
@next/third-parties14.1.0 · 1×
@radix-ui/react-dialog1.0.5 · 1×
@radix-ui/react-dropdown-menu2.0.6 · 1×
@radix-ui/react-slot1.0.2 · 1×
@t3-oss/env-core0.9.2 · 1×
@t3-oss/env-nextjs0.9.2 · 1×
@tailwindcss/line-clamp0.4.4 · 1×
@tailwindcss/typography0.5.10 · 1×
@testing-library/react14.2.1 · 1×

For agents

$ claude mcp add usehooks-ts \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact