React llms.txt · AI Docs Browser · mdream

[llms.txt Tools](https://mdream.dev/llms-txt/react/llms-txt)

# React llms.txt

Browse React documentation as markdown. Click any page in the sidebar to view it, or copy the full llms.txt for your AI tools.

react.dev/llms.txt

[Raw llms.txt](https://react.dev/llms.txt) [Raw llms-full.txt](https://react.dev/llms-full.txt)

Copy Markdown [](https://react.dev/llms.txt)

llms.txt

Learn React

Quick Start

Tutorial: Tic-Tac-Toe

Thinking in React

Installation

Creating a React App

Build a React App from Scratch

Add React to an Existing Project

Setup

Editor Setup

Using TypeScript

React Developer Tools

React Compiler

Introduction

Installation

Incremental Adoption

Debugging and Troubleshooting

Describing the UI

Your First Component

Importing and Exporting Components

Writing Markup with JSX

JavaScript in JSX with Curly Braces

Passing Props to a Component

Conditional Rendering

Rendering Lists

Keeping Components Pure

Your UI as a Tree

Adding Interactivity

Responding to Events

State: A Component's Memory

Render and Commit

State as a Snapshot

Queueing a Series of State Updates

Updating Objects in State

Updating Arrays in State

Managing State

Reacting to Input with State

Choosing the State Structure

Sharing State Between Components

Preserving and Resetting State

Extracting State Logic into a Reducer

Passing Data Deeply with Context

Scaling Up with Reducer and Context

Escape Hatches

Referencing Values with Refs

Manipulating the DOM with Refs

Synchronizing with Effects

You Might Not Need an Effect

Lifecycle of Reactive Effects

Separating Events from Effects

Removing Effect Dependencies

Reusing Logic with Custom Hooks

API Reference

Overview

Hooks

useActionState

useCallback

useContext

useDebugValue

useDeferredValue

useEffect

useEffectEvent

useId

useImperativeHandle

useInsertionEffect

useLayoutEffect

useMemo

useOptimistic

useReducer

useRef

useState

useSyncExternalStore

useTransition

Components

<Fragment> (<>)

<Profiler>

<StrictMode>

<Suspense>

<Activity>

<ViewTransition>

APIs

act

addTransitionType

cache

cacheSignal

captureOwnerStack

createContext

lazy

memo

startTransition

use

experimental_taintObjectReference

experimental_taintUniqueValue

Hooks

useFormStatus

Components

Common (e.g. <div>)

<form>

<input>

<option>

<progress>

<select>

<textarea>

<link>

<meta>

<script>

<style>

<title>

APIs

createPortal

flushSync

preconnect

prefetchDNS

preinit

preinitModule

preload

preloadModule

Client APIs

createRoot

hydrateRoot

Server APIs

renderToPipeableStream

renderToReadableStream

renderToStaticMarkup

renderToString

resume

resumeToPipeableStream

Static APIs

prerender

prerenderToNodeStream

resumeAndPrerender

resumeAndPrerenderToNodeStream

Compiling Libraries

Configuration

compilationMode

gating

logger

panicThreshold

target

Directives

"use memo"

"use no memo"

React Performance tracks

Lints

exhaustive-deps

rules-of-hooks

component-hook-factories

config

error-boundaries

gating

globals

immutability

incompatible-library

preserve-manual-memoization

purity

refs

set-state-in-effect

set-state-in-render

static-components

unsupported-syntax

use-memo

Overview

Components and Hooks must be pure

React calls Components and Hooks

Rules of Hooks

Server Components

Server Functions

Directives

'use client'

'use server'

Legacy React APIs

Children

cloneElement

Component

createElement

createRef

forwardRef

isValidElement

PureComponent

## What is React's llms.txt?

React publishes an `/llms.txt` file that provides AI systems with a structured index of its documentation. It follows the [llms.txt specification](https://llmstxt.org), organizing links to guides, API references, and tutorials under section headings so that LLMs like ChatGPT, Claude, and Gemini can quickly understand what React offers and where to find details.

Issues

Spec

2

Sections

177

Links

14.0 KB

Size

~3.6k

Tokens

Sections: Learn React · API Reference

## Add React Docs to Your AI Assistant

Select your tool to see how to add React's llms.txt as a documentation source.

Cursor

 Windsurf

 Claude Code

 ChatGPT

 Zed

 Copilot

1. 1

   Open any chat or composer panel
2. 2

   Type @Docs and select "Add new doc"
3. 3

   Paste the URL: https://react.dev/llms.txt
4. 4

   Wait for the green dot (indexing complete)
5. 5

   Reference @Docs in chat when asking about React

Cursor crawls the URL and indexes all subpages. Add a trailing slash to index child pages too.

## Spec Compliance 33 errors

## Frequently Asked Questions

Where is React's llms.txt file?

React publishes its llms.txt at https://react.dev/llms.txt. This file provides a structured, markdown-formatted index of React's documentation that AI systems can consume to understand the project's APIs, guides, and references.

How do I use React's llms.txt with AI coding assistants?

Copy the llms.txt content and paste it into your AI assistant (Cursor, Windsurf, Claude, ChatGPT) as context. This gives the AI an accurate map of React's documentation so it can provide better code suggestions and answers about React.

What does React's llms.txt contain?

React's llms.txt contains 2 sections and 177 documentation links in 14.0 KB (~3.6k tokens). Key sections include Learn React, API Reference.

How many tokens does React's llms.txt use?

The concise llms.txt index is approximately 3.6k tokens (14.0 KB). Most AI assistants can fit this within their context window. For the full expanded documentation, look for an llms-full.txt variant which embeds all content inline.

What is React?

The library for web and native user interfaces. React's llms.txt file helps AI systems understand this by providing a structured overview of its documentation, making it easier for developers to get accurate AI-assisted help when working with React.

Can I generate an llms.txt for my own project?

Yes. Use the free llms.txt generator at mdream.dev/tools/llms-txt/generator to crawl your site and produce a spec-compliant llms.txt file. You can also validate existing files with the llms.txt validator.

## Browse More llms.txt Files

[Three.js 3D library for JavaScript](https://mdream.dev/llms-txt/react/llms-txt/three-js) [LangChain Framework for developing applications powered by LLMs](https://mdream.dev/llms-txt/react/llms-txt/langchain) [Bun Incredibly fast JavaScript runtime, bundler, and package manager](https://mdream.dev/llms-txt/react/llms-txt/bun) [Fumadocs The documentation framework for Next.js](https://mdream.dev/llms-txt/react/llms-txt/fumadocs) [UnoCSS Instant on-demand atomic CSS engine](https://mdream.dev/llms-txt/react/llms-txt/unocss) [Grafbase The fastest GraphQL gateway](https://mdream.dev/llms-txt/react/llms-txt/grafbase) [GitHub Docs GitHub documentation](https://mdream.dev/llms-txt/react/llms-txt/github-docs) [Cal.com The open-source scheduling infrastructure](https://mdream.dev/llms-txt/react/llms-txt/cal-com)

[View all 99 projects ](https://mdream.dev/llms-txt/react/llms-txt)

## Related Tools

[<h3>llms.txt Generator</h3>Generate an llms.txt for your own project.](https://mdream.dev/llms-txt/react/tools/llms-txt/generator) [<h3>llms.txt Validator</h3>Validate your llms.txt against the official spec.](https://mdream.dev/llms-txt/react/tools/llms-txt/validator)

© 2026 [Harlan Wilton](https://github.com/harlan-zw) · [MIT](https://github.com/harlan-zw/mdream/blob/main/license)

[GitHub](https://github.com/harlan-zw/mdream) [Discord](https://discord.com/invite/275MBUBvgP)