Writing
Blog
Writing on system design, React, web performance, and the craft of building software.
Blog
React & Next.js
React Fundamentals
Expand All
1
Chapter 1: Introduction
2 articles
•
Not started
The Problem React Was Built to Solve
Part 1
•
5 min read
•
The DOM was state storage before React. jQuery helped but did not fix the root problem. React moved state into JavaScript and the entire mental model shifted.
React Has Separation of Concerns, Just Not the One You Learned First
Part 2
•
5 min read
•
Traditional web dev taught one file per technology. React breaks that rule on purpose. The separation is still there, it just runs along a different line.
2
Chapter 2: How React Works
3 articles
•
Not started
JSX Is Just a Function Call
Part 1
•
4 min read
•
Every JSX element compiles to React.createElement. That explains the old import-React requirement and why react-dom is a separate package from react.
Why useEffect Runs Twice in Development
Part 2
•
5 min read
•
React Strict Mode mounts every component twice in development to check for missing cleanup. That double useEffect run is intentional, not a bug.
Why React Components Must Be Pure
Part 3
•
4 min read
•
Props are immutable because mutating them is a side effect. React builds on pure functions because purity is what makes the component model predictable and safe to optimize.
3
Chapter 3: Components Jsx
1 article
•
Not started
Components, Props, and the Component Tree
Part 1
•
1 min read
•
Coming soon.
4
Chapter 4: State
2 articles
•
Not started
State: The Engine of React UIs
Part 1
•
1 min read
•
Coming soon.
Why Calling setState Twice Only Updates Once
Part 2
•
4 min read
•
Calling setState twice in the same handler often only applies one update. The fix is the functional update pattern, and understanding it requires understanding React state batching.
5
Chapter 5: Forms
2 articles
•
Not started
Forms in React: Controlled and Uncontrolled Inputs
Part 1
•
1 min read
•
Coming soon.
Controlled Elements: How React Takes Ownership of Form Inputs
Part 2
•
3 min read
•
By default, form inputs store their value in the DOM. Controlled elements move that value into React state, making the form fully predictable and resettable.
6
Chapter 6: Effects Data Fetching
1 article
•
Not started
Data Fetching with useEffect
Part 1
•
1 min read
•
Coming soon.
7
Chapter 7: Custom Hooks
1 article
•
Not started
Building Your First Custom Hook
Part 1
•
1 min read
•
Coming soon.
8
Chapter 8: Behind The Scenes
1 article
•
Not started
How React Renders: The Virtual DOM and Fiber
Part 1
•
1 min read
•
Coming soon.
9
Chapter 9: Reducers Performance
1 article
•
Not started
useReducer and Performance Optimization
Part 1
•
1 min read
•
Coming soon.
10
Chapter 10: Routing
1 article
•
Not started
React Router: Client-Side Navigation
Part 1
•
1 min read
•
Coming soon.
11
Chapter 11: Redux
1 article
•
Not started
Redux: Global State Without the Chaos
Part 1
•
1 min read
•
Coming soon.
React Fundamentals | Writing & Engineering | Durgesh Rai