Day 13-14 — Building Fabric from Scratch
Fabric now has:
→ JSX
→ Components
→ State & Effects
→ Events
→ Reconciliation
→ Keyed reconciliation
→ Scheduler
24/24 tests passing
Refactored the core architecture.
#TypeScript#Fabric#BuildInPublic
100 LeetCode questions completed.
Also earned the 50 Days Badge.
Two small milestones, but a good reminder that consistent effort adds up.
#LeetCode#DSA#Coding#ProblemSolving
Day 12 — Fabric
JSX is now working in Fabric — without React.
JSX → Fabric jsx()
JSX → VNode
Function components
Props + children
.tsx support
21/21 tests passing
#TypeScript#JavaScript#BuildInPublic#OpenSource
Day 10 — Building Fabric from Scratch
Improved Fabric's reconciliation engine with better diffing:
• Text updates
• Element replacement
• Child insertion/removal
• Keyed matching
• DOM reuse & movement
• Component updates
• Effect & event cleanup
#BuildInPublic#Fabric
Day 10 — Building Fabric from Scratch
Today I improved Fabric's reconciliation system.
Implemented:
• Keyed children reconciliation
• DOM node reuse
• List reordering
• Component instance preservation
The goal is to understand what happens behind the abstractions.
#Fabric
Day 9 — Building Fabric from Scratch
Built a proper Event System today.
Add, update & remove events
Multiple DOM events
Event listener management
Reconciliation integration
Type safe architecture
Slowly understanding what happens behind the abstractions.
#BuildInPublic#Fabric
Day 8 of building Fabric from scratch
Today I implemented useEffect() with:
• Dependency tracking
• Cleanup functions
• Mount & update handling
• Component-specific effects
Building React concepts from scratch is making the internals much clearer.
#BuildInPublic#Fabric
Day 7 — Building Fabric from Scratch
Today I improved Fabric's component architecture.
Each component now has its own instance and update path.
State Update
→ Component Instance
→ Component Re-render
→ VNode
→ Reconciliation
→ DOM Update
#TypeScript#BuildInPublic#Fabric
Day 6 — Building Fabric from Scratch
Function Components + component-specific state are now working!
State → Component → VNode → Reconciliation → DOM
Building a React-like UI library from scratch with TypeScript.
One feature at a time.
#TypeScript#JavaScript#BuildInPublic
Day 4–5: Building Fabric
Reconciliation took me 2 days to understand and implement.
Fabric can now:
→ Compare old and new VNodes
→ Detect type changes
→ Update props and events
→ Update text
→ Add/remove children
→ Reconcile nested elements
#buildinpublic#Fabric
Day 3: Building Fabric 🧵
Today I worked on Fabric's state system.
Fabric can now:
→ Create state with useState()
→ Handle multiple states
→ Update state
→ Support functional updates
→ Re-render when state changes
Next: reconciliation and diffing.
#buildinpublic#javascript
Day 2: Building Fabric
Made some progress today.
Fabric can now:
→ Create Virtual DOM nodes
→ Render them to the real DOM
→ Handle nested elements
→ Apply basic props
→ Handle events like onClick
Next: state and re-rendering.
#buildinpublic#javascript#typescript#Fabric
@ray_kovalev It renders the UI
the base layer devs build on top of not animations or visuals
Btw have you looked into how React does this internally?
That's basically what I'm rebuilding from scratch.
Just completed 50 questions on LeetCode
Learning something new every day and slowly getting better at solving problems.
Long way to go, but happy with the progress. Next target: 100 questions.
#LeetCode#DSA#CodingJourney