MCPcopy Index your code
hub / github.com/reactjs/react.dev

github.com/reactjs/react.dev @main sqlite

repository ↗ · DeepWiki ↗
1,214 symbols 3,248 edges 160 files 8 documented · 1%
README

react.dev

This repo contains the source code and documentation powering react.dev.

Getting started

Prerequisites

  1. Git
  2. Node: any version starting with v16.8.0 or greater
  3. Yarn: See Yarn website for installation instructions
  4. A fork of the repo (for any contributions)
  5. A clone of the react.dev repo on your local machine

Installation

  1. cd react.dev to go into the project root
  2. yarn to install the website's npm dependencies

Running locally

  1. yarn dev to start the development server (powered by Next.js)
  2. open http://localhost:3000 to open the site in your favorite browser

Contributing

Guidelines

The documentation is divided into several sections with a different tone and purpose. If you plan to write more than a few sentences, you might find it helpful to get familiar with the contributing guidelines for the appropriate sections.

Create a branch

  1. git checkout main from any folder in your local react.dev repository
  2. git pull origin main to ensure you have the latest main code
  3. git checkout -b the-name-of-my-branch (replacing the-name-of-my-branch with a suitable name) to create a branch

Make the change

  1. Follow the "Running locally" instructions
  2. Save the files and check in the browser
  3. Changes to React components in src will hot-reload
  4. Changes to markdown files in content will hot-reload
  5. If working with plugins, you may need to remove the .cache directory and restart the server

Test the change

  1. If possible, test any visual changes in all latest versions of common browsers, on both desktop and mobile.
  2. Run yarn check-all. (This will run Prettier, ESLint and validate types.)

Push it

  1. git add -A && git commit -m "My message" (replacing My message with a commit message, such as Fix header logo on Android) to stage and commit your changes
  2. git push my-fork-name the-name-of-my-branch
  3. Go to the react.dev repo and you should see recently pushed branches.
  4. Follow GitHub's instructions.
  5. If possible, include screenshots of visual changes. A preview build is triggered after your changes are pushed to GitHub.

Translation

If you are interested in translating react.dev, please see the current translation efforts here.

License

Content submitted to react.dev is CC-BY-4.0 licensed, as found in the LICENSE-DOCS.md file.

Extension points exported contracts — how you extend this code

ButtonProps (Interface)
(no doc)
src/components/Button.tsx
ComponentWithAs (Interface)
(no doc)
src/utils/forwardRefWithAs.tsx
RouteItem (Interface)
(no doc)
src/pages/llms.txt.tsx
SeoProps (Interface)
(no doc)
src/components/Seo.tsx
Sidebar (Interface)
(no doc)
src/pages/llms.txt.tsx
ButtonLinkProps (Interface)
(no doc)
src/components/ButtonLink.tsx
Page (Interface)
(no doc)
src/pages/llms.txt.tsx
PageHeadingProps (Interface)
(no doc)
src/components/PageHeading.tsx

Core symbols most depended-on inside this repo

matches1
called by 128
src/components/MDX/Sandpack/sandpack-rsc/sandbox-code/src/worker-bundle.dist.js
removeToken
called by 90
src/components/MDX/Sandpack/sandpack-rsc/sandbox-code/src/worker-bundle.dist.js
Z
called by 75
src/components/MDX/Sandpack/sandpack-rsc/sandbox-code/src/worker-bundle.dist.js
appendCode
called by 68
src/components/MDX/Sandpack/sandpack-rsc/sandbox-code/src/worker-bundle.dist.js
currentIndex
called by 65
src/components/MDX/Sandpack/sandpack-rsc/sandbox-code/src/worker-bundle.dist.js
copyToken
called by 54
src/components/MDX/Sandpack/sandpack-rsc/sandbox-code/src/worker-bundle.dist.js
matches1AtIndex
called by 51
src/components/MDX/Sandpack/sandpack-rsc/sandbox-code/src/worker-bundle.dist.js
replaceToken
called by 49
src/components/MDX/Sandpack/sandpack-rsc/sandbox-code/src/worker-bundle.dist.js

Shape

Function 986
Method 170
Interface 47
Class 10
Enum 1

Languages

TypeScript100%

Modules by API surface

src/components/MDX/Sandpack/sandpack-rsc/sandbox-code/src/worker-bundle.dist.js865 symbols
src/components/MDX/MDXComponents.tsx38 symbols
eslint-local-rules/rules/metadata.js18 symbols
src/components/MDX/Sandpack/sandpack-rsc/sandbox-code/src/rsc-server.js15 symbols
src/components/MDX/Sandpack/sandpack-rsc/sandbox-code/src/rsc-client.js13 symbols
scripts/deadLinkChecker.js13 symbols
src/pages/llms.txt.tsx11 symbols
src/components/Search.tsx8 symbols
src/components/MDX/CodeBlock/CodeBlock.tsx8 symbols
src/pages/[[...markdownPath]].js7 symbols
src/components/MDX/Sandpack/DownloadButton.tsx7 symbols
src/components/MDX/Heading.tsx6 symbols

Dependencies from manifests, versioned

@babel/core7.12.9 · 1×
@babel/plugin-transform-modules-commonjs7.18.6 · 1×
@babel/preset-react7.18.6 · 1×
@codesandbox/sandpack-react2.13.5 · 1×
@docsearch/css3.8.3 · 1×
@docsearch/react3.8.3 · 1×
@headlessui/react1.7.0 · 1×
@mdx-js/mdx2.1.3 · 1×
@radix-ui/react-context-menu2.1.5 · 1×
@types/classnames2.2.10 · 1×
@types/debounce1.2.1 · 1×

For agents

$ claude mcp add react.dev \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact