Chapter 0: How to Use This Book
- 0.1: Theory, Lab, and Production Pitfall - Structure Guide
- 0.2: Setting Up a Local RN Core Source Build
- 0.3: Navigating the RN Repository - Function‑Level Reading Order
- 0.4: Platform Prerequisites
Chapter 1: Fiber Architecture – The Foundation
- 1.1 Why React Needed a Rewrite
- 1.2 Fiber Node Structure
- 1.3 Reconciliation Heuristics and Child Diffing
- 1.4 Effect Flag Propagation and Commit Traversal
- 1.5 Bailout Rules and Subtree Skipping
- 1.6 Update Queues and State Model Internals (Overview)
Chapter 2: Scheduler and Lanes - Corrected Mental Model
- 2.1: The Scheduler - Task Queue for Interruptible Work
- 2.2: Priority Expiration and Starvation Handling
- 2.3: Lanes - React Reconciler’s Priority System
- Connection and Preview
Chapter 3: Suspense, Concurrent Features, and RN
- 3.1: Suspense on the Server vs. Native Client
- 3.2: Concurrent Rendering in React Native – Current Support
- 3.3: useTransition and useDeferredValue – Mounting Implications
- 3.4: Suspense Fallback and Fabric Shadow Tree Consistency
Chapter 4: Formal System Boundary Model - Ownership Invariants
- 4.1: React Owns
- 4.2: React Native Owns
- 4.3: Platform Owns
- 4.4: Ownership Boundaries - Explicit Contracts
- What Breaks When Boundaries Blur
- How to Read Code with Boundaries in Mind
- Summary of Invariants
- Connection to Previous and Next
Chapter 5: React Update Queues and State Model Internals – Deep Dive
- 5.1: Update Queue Architecture – updateQueue and shared.pending
- 5.2: Hook State Management – lastRenderedReducer and Dispatcher
- 5.3: Batching and Lane Prioritization Inside the Queue
- 5.4: Forced Updates vs. Bailouts – When State Changes but Rendering Skips
- 5.5: Cross‑Component State Propagation – Context and Refs
Chapter 6: Legacy Bridge → JSI → Why the Bridge Failed
- 6.1 Legacy Bridge (Deprecated)
- 6.2 JSI – Synchronous, Type-Safe Runtime Embedding
- 6.3 Migration Constraints Inside Meta
- 6.4 The Diff‑Driven Mental Model
- 6.5 Writing Safe Code in RN’s C++ & JSI Environment
Chapter 7: Fabric – New Mounting System (Deep Enough to Modify)
- 7.1 Shadow Tree – Immutability and Revision Model
- 7.2 ShadowNode Cloning Semantics
- 7.3 Mounting Layer Diffing and Props/State Separation
- 7.4 Partial Tree Commits and Consistency Guarantees
- Chapter Flow Summary
Chapter 8: Scheduler Implementation Details – Black Box Opened
- 8.1: RuntimeScheduler – The Distributed Scheduler Problem
- 8.2: Task Queue Internals – The Priority Queue
- 8.3: Priority System – From React Priority to Execution Order
- 8.4: Yielding and Preemption – How High Priority Work Interrupts
- 8.5: Starvation Prevention – The Expiration Time Guarantee
- 8.6: Platform Runloop Integration – The Wakeup Source
- 8.7: Immediate vs Sync vs Async – Three Scheduling Modes
- 8.8: Microtasks – The Missing Feature
- 8.9: Common Failure Modes – What Breaks in Production
- 8.10: Observing the Scheduler – Tools and Incantations
- 8.11: Changing the Scheduler – What You Can Modify
Chapter 9: Events, Priorities, and Responder System
- 9.1 Event Pipeline Overview
- 9.2 Discrete vs. Continuous Events
- 9.3 Event Priority vs. Render Priority Interaction
- 9.4 Responder System Internals
- 9.5 Event Loop Integration
- 9.6 Testing Event Behavior
- 9.7 Common Failure Patterns
- 9.8 Next Chapter
Chapter 10: Concurrency Hazards and Race Conditions
- 10.1 Shared Mutable State – When Shadows and Props Collide
- 10.2 React Concurrent Features + Fabric – Known Races
- 10.3 Threading Model – Background Work and Commit Consistency
- 10.4 Data Races in JSI Host Objects – Prevention Patterns
- Connecting to Chapter 9
- Next Chapter: Code Reading Guides
Chapter 11: Code Reading Guides – Function‑Level Navigation
- 11.5: Navigation Training – Where Code Lives & How to Trace Cross‑Language Flow
Chapter 12: Event Loop Coordination – Runloops and Schedulers
- 12.1: Runloop Primer – iOS CFRunLoop and Android Looper
- 12.2: JS Message Queue vs Native Dispatch Queue
- 12.3: JSI Callback Scheduling from Background Threads
- 12.4: Runloop Integration Deep Dive
Chapter 13: Testing Strategies for Core Contributors – Beyond It Works on My Machine
- 13.1 The Testing Pyramid for RN Core
- 13.2 How to Write a Minimal Failing Case Inside the RN Repository
- 13.3 Fabric Specific Validation – How to Test the Shadow Tree
- 13.4 Behavioural vs Snapshot Testing – When to Use Which
- 13.5 CI and Pre commit Hooks
- 13.6 Safety Checklist for Testing
- Connection and Preview
Chapter 14: Pull Request Case Studies – Real Contributor Examples
- 14.1 Small but Impactful – JSI Typing Fixes
- 14.2 Fabric Performance Regression – Bisect and Patch
- 14.3 Event Priority Mismatch – From Issue to Merge
- 14.4 Writing a New TurboModule – Step‑by‑Step PR Walkthrough
- 14.5 What These PRs Teach Us
Chapter 15: What Is NOT Guaranteed – And How to Survive
- 15.1 Unstable Public APIs – Documentation vs. Reality
- 15.2 Threading Assumptions That Change Between Releases
- 15.3 Layout and Measurement – Invariants You Cannot Rely On
- 15.4 When to Fork RN – Warning Signs and Escape Hatches
- 15.5 Detecting Regression Early – Telemetry for Invariants
- Summary for Chapter 15
Chapter 16: How to Write and Submit a Patch (RN Core)
- 16.1 Setup a Development Environment – Building RN from Source
- 16.2 Choosing the Right Branch –
mainvs. Stable Backport - 16.3 Commit Message Conventions and Changelog Requirements
- 16.4 Testing Your Change Locally – RNTester and Fabric Tester
- 16.5 Running CI Locally with
gitTricks - 16.6 Responding to Code Review – Meta’s Expectations
- 16.7 PR Case Study – Small Change That Landed
- 16.8 What Happens After Merge
- Summary for Chapter 16