$ show reactjs/zh-hans.react.dev
This repository is the Simplified Chinese translation of the official React documentation website (react.dev). It is a Next.js static site (Pages Router) that serves MDX-based documentation with interactive code examples via Sandpack, including a sophisticated React Server Components (RSC) sandbox that runs user code in a Web Worker inside an iframe. The site features Algolia DocSearch, RSS feed generation, an error decoder page that fetches React error codes from GitHub, and custom ESLint rules that lint markdown code blocks using the React Compiler. The architecture is a standard Next.js static site with custom remark/rehype plugins, a component library for MDX (challenges, diagrams, callouts, etc.), and a layout system with sidebar navigation and table of contents. The repository is actively maintained and synchronized with the upstream react.dev repository, with translations managed via a dedicated process.
The LLM identified 2 files worth highlighting for reuse:
Implements a Web Worker that compiles user-provided React Server Components code using Sucrase, detects 'use client' and 'use server' directives, executes the server components, and streams Flight chunks back to the client. This is a self-contained, reusable pattern for running RSC in a sandboxed environment, demonstrating deep understanding of React's server component protocol and worker-based isolation.
A custom ESLint rule that extracts code blocks from Markdown files, compiles them with the React Compiler, and reports any compilation errors. It supports expected-error metadata in code fences and can auto-fix by updating error counts. This is a reusable pattern for validating code examples in documentation, demonstrating advanced ESLint rule authoring and integration with the React Compiler.