Back to Architecture Explorer

facebook / react

The library for web and native user interfaces.

212.0k
JavaScript / Flow
Architecture: monorepo
main
react
.github
compiler
packages
babel-plugin-react-compiler
eslint-plugin-react-compiler
fixtures
dom
flight
packaging
packages
react
react-dom
react-reconciler
react-native-renderer
scheduler
scripts
build
error-codes
jest
release
ReactVersions.js
README.md
package.json
yarn.lock
Structural Architecture

React's repository is structured as a complex monorepo heavily utilizing Yarn workspaces. It encapsulates both the core reconciler and various platform renderers (DOM, Native, Test, etc.) side-by-side, sharing massive amounts of internal compiler and shared abstractions.

  • Monorepo encapsulation via tightly coupled 'packages' directory.
  • Clear separation of the abstract reconciler from the specific platform renderers engine.
  • Heavy reliance on internal build scripts and custom fixture testing setups.

Notable Directories

/packages/react

The core React isomorphic library API.

/packages/react-dom

The DOM rendering implementation and browser-specific logic.

/packages/react-reconciler

The core Fiber tree implementation and scheduling engine.

/compiler

Contains the experimental React compiler (Forget).

Build Your Own Ecosystem

Learn from react's structure and craft your own software scaffolding.