near-connect-hooks

Manage NEAR wallet connections and contract calls with React hooks.

14|3|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/near/agent-skills --skill near-connect-hooks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: near-connect-hooks
Source: https://github.com/near/agent-skills/tree/main/skills/near-connect-hooks
Command: npx skills add https://github.com/near/agent-skills --skill near-connect-hooks

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

## What problem does it solve? This skill provides React developers with hooks to manage NEAR wallet integration, simplifying wallet connections, account state, and contract interactions in modern web apps.

## Core Features & Use Cases

  • Integrates NearProvider, useNearWallet, and Actions to support wallet connection, view function calls, function calls, token transfers, and NEP-413 message signing.
  • Supports account management workflows (sign in/out, balance checks, and key management) within React/Next.js projects.
  • Enables rapid development of NEAR-enabled DApps with deterministic wallet actions.

### Quick Start

  1. Install the package: npm install near-connect-hooks @hot-labs/near-connect near-api-js
  2. Wrap your app with NearProvider and use the useNearWallet hook to connect wallets, query contracts, and perform transactions.

Frequently Asked Questions about near-connect-hooks

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I connect a NEAR wallet in a React application?

To connect a NEAR wallet in React, you can use a hook-based approach by wrapping your app with a provider and calling a wallet hook to manage sign-in flows and account state.

How do I call NEAR smart contract methods using React hooks?

You can call NEAR smart contract methods by using dedicated React hooks to execute view functions for reads and change methods for writes, simplifying transaction logic.

Can I sign NEP-413 messages and manage access keys with near-api-js in Next.js?

Yes, you can sign NEP-413 messages and manage access keys in Next.js by leveraging React hooks that wrap near-api-js for deterministic message signing and key operations.

Do I need to install @hot-labs/near-connect to use NEAR wallet hooks?

Yes, you need to install @hot-labs/near-connect and near-api-js alongside the hooks package, as they provide the underlying wallet connection and blockchain API logic.

What is the best way to handle NEAR token transfers in a React DApp?

The best way to handle NEAR token transfers in a React DApp is using exposed action hooks that wrap wallet operations, ensuring deterministic and ship-ready transaction signing.

Does this React wallet integration support account balance checks and sign-out?

Yes, this React wallet integration supports full account management workflows including balance checks, sign-out, and access key management through a unified wallet hook.