Logo vun useHooks.io

useHooks.io

Organisatioun
small-lab-io

A comprehensive collection of modern, reusable React hooks designed to simplify your development workflow and enhance your applications.

Editeursmall-lab-io
Repositoryusehooks.io
SproochTypeScript
Forks
2
Stären
23
Disponibel Tools
4
Transporttypstdio
Kategorien
LizenzMIT
Linken
  • Tools mat KI-Workflows verbannen

    useHooks.io stellt MCP-Funktioune bereit, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • 4 disponibel Tools

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an Ärem bevorzugte MCP-Client ze konfiguréieren.

  • Indicateure fir Open Source

    23 Stären an 2 Forks aus dem verlinkte Repository.


✨ Features

  • 🎯 30+ Production-Ready Hooks - Carefully crafted and battle-tested
  • 🚀 Zero Configuration - Works out of the box with any React project
  • 📦 CLI Tool - Add hooks to your project with a single command
  • 🔍 Smart Search - Find hooks by name, description, or category
  • 🛡️ Type Safe - Full TypeScript support with comprehensive type definitions
  • 📱 Modern APIs - Leverages latest browser APIs and React patterns
  • 🎨 Customizable - Flexible configuration options for every use case
  • 📋 Well Documented - Comprehensive docs with examples and best practices

🚀 Quick Start

Using the CLI (Recommended)

bash
# Initialize usehooks in your project
npx usehooks-cli@latest init

# Add a specific hook
npx usehooks-cli@latest add use-counter

# List all available hooks
npx usehooks-cli@latest list

# Get detailed information about a hook
npx usehooks-cli@latest info use-geolocation

📚 Available Hooks

Our collection includes 30+ hooks organized by category:

🏪 State Management

  • useArray - Helper methods for array state manipulation
  • useCounter - Counter state with increment, decrement, and reset
  • useLocalStorage - Sync state with localStorage
  • useSet - Comprehensive Set data structure management
  • useToggle - Boolean toggle state with convenient methods

📡 Sensors & Device APIs

  • useAudioRecorder - Audio recording with real-time analysis
  • useBarcodeDetector - Barcode and QR code detection
  • useDeviceOrientation - Device orientation data access
  • useGeolocation - User location with GPS tracking
  • useHover - Element hover detection with callbacks
  • useIsMobile - Mobile device detection using media queries and user agent
  • useIsTablet - Tablet device detection with comprehensive device identification
  • useMediaSession - Media notifications and control actions
  • useNetworkInformation - Network connection monitoring
  • useUserMedia - Camera and microphone access
  • useVibration - Device vibration control

🌐 Browser APIs

  • useBluetooth - Bluetooth Low Energy device interaction
  • useClipboard - Clipboard operations with state management
  • useContactPicker - Contact selection with user permission
  • useFullscreen - Fullscreen mode management
  • useStorage - Browser storage quotas and persistence
  • useWebShare - Native sharing mechanisms
  • useWindowSize - Window dimensions tracking

🔧 Utilities

  • useDebounce - Value debouncing for performance
  • useThrottle - Value throttling for rate limiting
  • usePrevious - Access to previous state/prop values
  • useIsMounted - Component mount status checking
  • useTimeout - Timeout management with controls

🔄 Lifecycle

  • useDeepCompareEffect - useEffect with deep equality check
  • useUpdateEffect - useEffect that skips initial render

🌍 Network

  • useFetch - HTTP requests with loading states and error handling

🔐 Authentication

  • useRoleGuard - Role-based access control 💡 Tip : Run npx usehooks-cli@latest list to see the complete list with descriptions and categories.

🛠️ CLI Tool

Our powerful CLI tool makes it easy to discover, install, and manage hooks in your projects.

Key Features

  • 🚀 Quick Installation - Add hooks with a single command
  • 🔍 Smart Search - Find hooks by name, description, or category
  • 📋 Detailed Information - Get comprehensive details about any hook
  • 🔄 Update Management - Keep hooks up-to-date
  • 🗑️ Clean Removal - Remove hooks and dependencies safely
  • 📱 Interactive Mode - User-friendly prompts and confirmations

Commands

bash
# Initialize project
npx usehooks-cli@latest init

# Add hooks
npx usehooks-cli@latest add use-counter use-toggle

# List all hooks
npx usehooks-cli@latest list

# Get hook information
npx usehooks-cli@latest info use-geolocation

# Update hooks
npx usehooks-cli@latest update --all

# Remove hooks
npx usehooks-cli@latest remove use-counter

🏗️ Project Structure

This monorepo contains several packages:

usehooks.io/
├── packages/
│   ├── hooks/              # 🪝 Core hooks library
│   ├── usehooks-cli/       # 🛠️ CLI tool for hook management
│   ├── ui/                 # 🎨 Shared UI components
│   ├── eslint-config/      # 📏 ESLint configuration
│   └── typescript-config/  # 📝 TypeScript configuration
├── apps/
    └── www/               # 🌐 Documentation website

🤝 Contributing

We welcome contributions! Here's how you can help:

Adding a New Hook

  1. Fork and clone the repository
  2. Create a new hook directory in packages/hooks/src/
  3. Follow the hook template :
    use-your-hook/
    ├── index.ts      # Hook implementation
    ├── meta.json     # Hook metadata
    └── doc.json      # Documentation
  4. Add comprehensive tests
  5. Update the index.json file
  6. Submit a pull request

Guidelines

  • ✅ TypeScript first - All hooks must be written in TypeScript
  • ✅ Comprehensive tests - Include unit tests and edge cases
  • ✅ Clear documentation - Provide examples and use cases
  • ✅ Performance focused - Optimize for minimal re-renders
  • ✅ Browser compatibility - Support modern browsers
  • ✅ Accessibility - Consider a11y implications

📖 Documentation

  • 🌐 Website : usehooks.io
  • 📚 Hook Documentation : Each hook includes comprehensive docs with examples
  • 🛠️ CLI Documentation : Run npx usehooks-cli@latest --help
  • 🎯 Examples : Check the /examples directory in each hook

🔧 Requirements

  • Node.js : 20 or higher
  • React : 18 or higher
  • TypeScript : 5.8 or higher (recommended)

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Installatioun

TypingMind
Viraussetzungen:

Node.js 18+

{
  "mcpServers": {
    "usehooks": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-usehooks"
      ]
    }
  }
}

Disponibel Tools

  • list_hooks

    List all available React hooks, optionally filtered by category

  • get_categories

    Get all available hook categories

  • search_hooks

    Search hooks by name or description

  • get_hook

    Get full details and implementation of a hook

useHooks.io MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal useHooks.io verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung fir de lokale Connector ze benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector mat „Dësen Apparat“ ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Pescht de Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

useHooks.io als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a pescht d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Pescht d'MCP-Serverkonfiguratioun vu useHooks.io an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "usehooks-io": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-usehooks"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vu useHooks.io. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vu useHooks.io.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierte MCP-Tools an engem ausgewielte KI-Modell
Hëlleft Dir mir bei dëser Aufgab mat useHooks.io?
useHooks.io
Jo. Ech hunn et gelies.
Dat hunn ech mat useHooks.io fonnt.

Heefeg gestallte Froen

Fir wat gëtt de MCP-Server useHooks.io benotzt?

useHooks.io ass e MCP-Server, deen et kompatibele KI-Clienten erlaabt, sech mat externen Tools a Kontext ze verbannen. An TypingMind kënnt Dir dëse MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech useHooks.io MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir useHooks.io mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni de MCP-Server fir all Modell separat anzeriichten.

Firwat useHooks.io MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann useHooks.io verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Är Chataarbecht an TypingMind organiséieren.

Wéi verbannen ech useHooks.io MCP mat TypingMind?

useHooks.io leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann de MCP-Server Zougrëff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

Wéi eng Tools stellt useHooks.io MCP an TypingMind zur Verfügung?

useHooks.io stellt 4 MCP-Tools zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agenten zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir useHooks.io MCP ze benotzen?

Nee. TypingMind setzt op lokal Veraarbechtung a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann useHooks.io eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir dee MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇