You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/README.md
+8-3Lines changed: 8 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ Welcome to the MiniReact design docs. These documents dive deep into how the fib
6
6
7
7
MiniReact is a simplified React clone built with a modern fiber architecture. It's not trying to be a production framework - it's an educational project that demonstrates how React works under the hood.
8
8
9
-
The codebase is fully functional with 484 passing tests covering all major features. It's a great way to understand React's internals without getting lost in production complexity.
9
+
The codebase is fully functional with 539 passing tests covering all major features. It's a great way to understand React's internals without getting lost in production complexity.
10
10
11
11
## Documentation Structure
12
12
@@ -19,6 +19,7 @@ The docs are organized to build understanding progressively:
19
19
Start here. This covers the fundamental concepts: what fibers are, why we have two trees, how the render and commit phases work, and how we traverse the tree without recursion.
20
20
21
21
Key topics:
22
+
22
23
- Fiber data structure
23
24
- Double-buffer pattern
24
25
- Render vs commit phases
@@ -30,6 +31,7 @@ Key topics:
30
31
The work loop is the engine that drives everything. It schedules updates, builds the work-in-progress tree, and coordinates between phases.
31
32
32
33
Key topics:
34
+
33
35
- Processing units of work
34
36
- Depth-first traversal
35
37
- Effect collection
@@ -41,6 +43,7 @@ Key topics:
41
43
Reconciliation is the diffing algorithm. It figures out what changed between renders and computes the minimal DOM operations needed.
42
44
43
45
Key topics:
46
+
44
47
- Key-based reconciliation
45
48
- Movement detection
46
49
- Handling mixed keyed/unkeyed children
@@ -54,6 +57,7 @@ Key topics:
54
57
Events in MiniReact use delegation for efficiency. One listener at the root handles everything and routes events through the React tree.
55
58
56
59
Key topics:
60
+
57
61
- Event delegation
58
62
- Synthetic events
59
63
- Portal event bubbling
@@ -65,6 +69,7 @@ Key topics:
65
69
Hooks let functional components have state and side effects. They're implemented as an array on each fiber with order maintained by a cursor.
66
70
67
71
Key topics:
72
+
68
73
- Hook storage and context
69
74
- useState and useReducer
70
75
- useEffect and cleanup
@@ -193,7 +198,7 @@ Current bottlenecks and future work:
193
198
194
199
## Testing
195
200
196
-
The test suite has 484 passing tests covering:
201
+
The test suite has 539 passing tests covering:
197
202
198
203
- Core rendering and reconciliation
199
204
- All hooks (useState, useEffect, useRef, etc.)
@@ -259,6 +264,6 @@ MiniReact implements:
259
264
- Fragment support
260
265
- Component memoization
261
266
262
-
All in about 3000 lines of readable TypeScript with 100% test coverage.
267
+
All in about 3000 lines of readable TypeScript with comprehensive test coverage.
263
268
264
269
The goal is understanding, not production use. Fork it, break it, learn from it.
0 commit comments