JSPM

@nostr-dev-kit/react

1.3.12
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 429
    • Score
      100M100P100Q67618F
    • License MIT

    React hooks for the Nostr Development Kit (NDK)

    Package Exports

    • @nostr-dev-kit/react

    Readme

    @nostr-dev-kit/react

    React hooks for the Nostr Development Kit (NDK)

    Overview

    @nostr-dev-kit/react provides a set of React hooks and utilities to easily integrate Nostr functionality into your React applications using NDK. This library helps you efficiently manage Nostr data in your React components, including:

    • NDK instance management with useNDKInit and useNDK
    • Current user management with useNDKCurrentUser
    • User resolution from various formats with useUser
    • User profile management with useProfileValue
    • Multi-user session management
    • Event subscriptions with modern callback patterns

    Installation

    # npm
    npm install @nostr-dev-kit/react
    
    # pnpm
    pnpm add @nostr-dev-kit/react
    
    # yarn
    yarn add @nostr-dev-kit/react