@nostr-dev-kit/ndk-hooks
TypeScript icon, indicating that this package has built-in type declarations

1.1.34 • Public • Published

@nostr-dev-kit/ndk-hooks

React hooks for the Nostr Development Kit (NDK)

Overview

@nostr-dev-kit/ndk-hooks 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 profile management with useProfileValue
  • Multi-user session management
  • Event subscriptions with modern callback patterns

Installation

# npm
npm install @nostr-dev-kit/ndk-hooks

# pnpm
pnpm add @nostr-dev-kit/ndk-hooks

# yarn
yarn add @nostr-dev-kit/ndk-hooks

Readme

Keywords

Package Sidebar

Install

npm i @nostr-dev-kit/ndk-hooks

Weekly Downloads

335

Version

1.1.34

License

MIT

Unpacked Size

188 kB

Total Files

6

Last publish

Collaborators

  • jinglescode
  • pablof7z