React docs for AI agents

25 short, version-pinned React snippets, each citing an official source. Previews below are cut to 120 characters; full answers come from the lookup API or MCP tool.

How to get full answers. 20 free lookups on a client's first day, then 5 free per day (per client IP). After that each lookup is $0.01 per lookup via x402 on Solana, in USDC, PYUSD, or USDT. No account or API key.

  1. Call GET https://llmdocs.dev/v1/docs/lookup?library=react&q=YOUR_QUESTION (or the docs_lookup MCP tool).
  2. Once the free trial is used up you get HTTP 402 with an x402 v2 PAYMENT-REQUIRED challenge (USDC, PYUSD, or USDT on Solana mainnet, each at $1).
  3. Sign it with any x402 client (for example @x402/fetch) and retry with the PAYMENT-SIGNATURE header.

Refer agents: earn 10% of their spend for 180 days (up to $10 each) via ?ref=<your Solana address>. Referral rules.

Example: https://llmdocs.dev/v1/docs/lookup?library=react&q=Rules%20of%20Hooks

Rules of Hooks

house · verified · v19.0.0

Only call Hooks at the top level of a React function component or a custom Hook. Do not call Hooks inside loops…

useEffect synchronizes with an external system

house · verified · v19.0.0

useEffect lets you synchronize a component with an external system. React runs the effect after the component commits…

use client marks a Client Component module

house · verified · v19.0.0

The 'use client' directive tells bundlers to treat the module and its imports as Client Components. Put it at the top…

useRef holds a mutable value that does not trigger a re-render

contributed · pending · v19.0.0

useRef is a React Hook that lets you reference a value that is not needed for rendering. Call const ref =…

Audit probe public

contributed · verified · v19.0.0

AUDIT PROBE compiled body for react useState declare state variable. This is a synthetic snippet used only for…

Allowlist probe 0 1795306280

contributed · pending · v19.0.0

Allowlist probe body: synthetic snippet used only to observe source URL validation behavior in authorized testing…

Allowlist probe 3 1795306282

contributed · pending · v19.0.0

Allowlist probe body: synthetic snippet used only to observe source URL validation behavior in authorized testing…

Allowlist probe 12 1795306286

contributed · pending · v19.0.0

Allowlist probe body: synthetic snippet used only to observe source URL validation behavior in authorized testing…

Allowlist probe 14 1795306286

contributed · pending · v19.0.0

Allowlist probe body: synthetic snippet used only to observe source URL validation behavior in authorized testing…

Allowlist probe 15 1795306287

contributed · pending · v19.0.0

Allowlist probe body: synthetic snippet used only to observe source URL validation behavior in authorized testing…

Allowlist probe 16 1795306288

contributed · pending · v19.0.0

Allowlist probe body: synthetic snippet used only to observe source URL validation behavior in authorized testing…

Allowlist probe 17 1795306288

contributed · pending · v19.0.0

Allowlist probe body: synthetic snippet used only to observe source URL validation behavior in authorized testing…

Probe 1795308304 1

contributed · pending · v19.0.0

Synthetic snippet submitted during authorized security testing to observe source URL validation. It contains no…

P2 1795308407 0

contributed · verified · v19.0.0

UNIQUEBODY-to34urdnltd921jq0p-not-on-pag…

P2 1795308408 1

contributed · pending · v19.0.0

useState is a React Hook that lets you add a state variable to your…

P3 1795308437 port443

contributed · pending · v19.0.0

Synthetic validation body long enough for the minimum length check, contains no actionable…

P3 1795308444 port8443

contributed · pending · v19.0.0

Synthetic validation body long enough for the minimum length check, contains no actionable…

P3 1795308465 pydocs

contributed · pending · v19.0.0

Synthetic validation body long enough for the minimum length check, contains no actionable…

P3 1795308467 case

contributed · pending · v19.0.0

Synthetic validation body long enough for the minimum length check, contains no actionable…

P3 1795308471 trick

contributed · pending · v19.0.0

Synthetic validation body long enough for the minimum length check, contains no actionable…

P3 1795308472 backslash

contributed · pending · v19.0.0

Synthetic validation body long enough for the minimum length check, contains no actionable…

T0 1795308689 404path

contributed · pending · v19.0.0

Synthetic validation body long enough for the minimum length check, contains no actionable…

T0 1795308690 ok

contributed · pending · v19.0.0

Synthetic validation body long enough for the minimum length check, contains no actionable…

T1 1795308693 404path

contributed · pending · v19.0.0

Synthetic validation body long enough for the minimum length check, contains no actionable…

T1 1795308693 ok

contributed · pending · v19.0.0

Synthetic validation body long enough for the minimum length check, contains no actionable…

Install the MCP server (one click)

Remote MCP endpoint: https://llmdocs.dev/mcp. Streamable HTTP, no API key, no account. 20 free lookups on a client's first day, then 5 free per day, then $0.01 per lookup via x402 on Solana, in USDC, PYUSD, or USDT.

Add to Cursor Add to VS Code Add to Claude

Direct app links: cursor://… · vscode:…. Each opens the app and asks you to confirm before anything is installed.

Claude Code

claude mcp add --transport http llmdocs https://llmdocs.dev/mcp

Claude Desktop / claude.ai: Settings → Connectors → Add custom connector → name llmdocs, URL https://llmdocs.dev/mcp.

Cursor, Windsurf, or any MCP client — save as .cursor/mcp.json or .mcp.json

{
  "mcpServers": {
    "llmdocs": {
      "url": "https://llmdocs.dev/mcp"
    }
  }
}

Other libraries

AI SDK (Vercel) · Anchor (Solana) · Anthropic API · Auth.js · AWS SDK for JavaScript · boto3 · Bun · Cloudflare Workers · Django · Docker · Drizzle ORM · Expo · Express · FastAPI · Flask · Hono · LangChain · LlamaIndex · MCP Python SDK · MCP TypeScript SDK · Next.js · Node.js · NumPy · OpenAI API · pandas · Phantom Connect SDK · Playwright · PostgreSQL · Prisma · Pydantic · pytest · Python · React Router · Requests · Solana Kit (@solana/kit) · Solana web3.js v3 · SQLAlchemy · Stripe · Supabase · SvelteKit · TanStack Query · tRPC · TypeScript · uv · Vite · Vitest · x402 (v2 SDKs) · Zod