main
md 46 lines 1.24 KB
Rendered Raw
1 # React
2
3 **Scope**: All code EXCEPT `/compiler/` (compiler has its own instructions).
4
5 ## Project Structure
6
7 | Directory | Purpose |
8 |-----------|---------|
9 | `/packages/` | Publishable packages (react, react-dom, scheduler, etc.) |
10 | `/scripts/` | Build, test, and development scripts |
11 | `/fixtures/` | Test applications for manual testing |
12 | `/compiler/` | React Compiler (separate sub-project) |
13
14 ## Key Packages
15
16 | Package | Purpose |
17 |---------|---------|
18 | `react` | Core React library |
19 | `react-dom` | DOM renderer |
20 | `react-reconciler` | Core reconciliation algorithm |
21 | `scheduler` | Cooperative scheduling |
22 | `react-server-dom-*` | Server Components |
23 | `react-devtools-*` | Developer Tools |
24 | `react-refresh` | Fast Refresh runtime |
25
26 ## Requirements
27
28 - **Node**: Must be installed. Stop and prompt user if missing.
29 - **Package Manager**: Use `yarn` only.
30
31 ## Verification
32
33 **IMPORTANT**: Use `/verify` to validate all changes before committing.
34
35 ## Commands
36
37 | Command | Purpose |
38 |----------|----------------------|
39 | `/fix` | Lint and format code |
40 | `/test` | Run tests |
41 | `/flow` | Type check with Flow |
42 | `/flags` | Check feature flags |
43
44 ## Building
45
46 Builds are handled by CI. Do not run locally unless instructed.