Chapter 0: Prerequisites and Mindset
- 0.1: Why React
- 0.2: Essential JavaScript for React
- 0.3: ES Modules
- 0.4: Setting Up Your Environment
- 0.5: TypeScript for React (Quick Start)
- How to Think Moving Forward
- Chapter Summary
- What Comes Next
Chapter 2: Components and JSX
- 2.1: What is a Component
- 2.2: Functional Components
- 2.3: JSX: JavaScript plus XML
- 2.4: Rules of JSX
- 2.5: Component Composition
- Closing Thoughts
Chapter 3: Props & Data Flow
- 3.1: Passing Props to Components
- 3.2: Destructuring Props Inline
- 3.3: The children Prop
- 3.4: TypeScript for Props
- 3.5: Unidirectional Data Flow
- Common Mistakes
- Summary
- Looking Ahead
Chapter 4: State and Events
- 4.1: The
useStateHook - 4.2: Handling User Events
- 4.3: State is Immutable
- 4.4: Functional Updates
- 4.5: Lifting State Up
Mini Project: Interactive Counter and Todo List
- Part 1: Interactive Counter
- Part 2: Todo List (Add and Delete)
- What You Just Learned
- Coming Next
Chapter 5: Rendering Lists and Conditional UI
- 5.1: Rendering Lists with map
- 5.2: The key Prop
- 5.3: Conditional Rendering
- 5.4: Returning null
- 5.5: Filtering Lists
- Chapter Summary
- What comes next
Chapter 6: Side Effects and useEffect
- 6.1: What are side effects
- 6.2: The useEffect hook
- 6.3: Dependency array explained
- 6.4: Cleanup function
- 6.5: Common useEffect pitfalls
- 6.6: Fetching data with useEffect
- Chapter summary
- Next chapter preview
Chapter 7: Forms and Refs
- 7.1: Controlled Components
- 7.2: Handling Multiple Inputs
- 7.3: Uncontrolled Components with useRef
- 7.4: Form Validation Basics
- 7.5: When to Use Refs vs State
Mini Project: Weather App and Interactive Form
- Part 1: Weather App
- Part 2: Interactive Form
New Mini Test: Debug a Broken useEffect
- Problem 1: Infinite Loop
- Problem 2: Stale Closure
- Debugging Mindset
Chapter Summary
Next Chapter Preview
Chapter 8: Context API
- 8.1: The Problem of Prop Drilling
- 8.2: What is Context
- 8.3: Creating a Context
- 8.4: Provider and Consumer Relationship
- 8.5: Creating a Custom Context Wrapper
- 8.6: When Context is Enough
- 8.7: When Context is Not Enough
- Chapter Summary
- Next Chapter Preview
Chapter 9: Reducers & Complex State
- 9.1: When state becomes complex
- 9.2: Understanding useReducer
- 9.3: Actions, Reducers, and Dispatch
- 9.4: Combining useReducer with Context
- Mental model summary
- Next chapter preview: Memoization and performance
Chapter 10: Memoization & Performance
- 10.1: Why React Re-renders
- 10.2: React.memo for Component Memoization
- 10.3: useMemo and useCallback
- 10.4: When NOT to Use Memoization
- 10.5: Common Performance Pitfalls
- 10.6: List Virtualization (Handling Large Lists)
- Chapter Summary
- Next Chapter Preview: Chapter 11 – Custom Hooks
Chapter 11: Custom Hooks
- 11.1: Creating your own hooks
- 11.2: Rules of hooks inside custom hooks
- 11.3: Real examples of reusable hooks
- 11.4: Composing hooks together
- Key idea to remember
- Next chapter preview
- Chapter 12: Testing Components and Hooks
Chapter 12: Testing Components & Hooks
- 12.1: Why test React code
- 12.2: Setting up the testing environment
- 12.3: Testing a component
- 12.4: Testing custom hooks
- 12.5: Mocking API calls
- 12.6: What good tests look like
- Mini Project: Shopping Cart (Context + useReducer + Tests)
- Next Chapter Preview: Routing in React
Chapter 13: Routing with React Router v6
- 13.1: Setting up react-router-dom
- 13.2: BrowserRouter, Routes, and Route
- 13.3: Link and NavLink
- 13.4: Nested Routes and Outlet
- 13.5: URL Params and Query Strings
- 13.6: Programmatic Navigation
- Chapter Summary
- Next Chapter Preview: State Management (From Local to Global)
Chapter 14: State Management
- 14.1: When to Use What (Decision Flow for State)
- 14.2: Local State, Reducers, and Shared State Boundaries
- 14.3: Context API for Shared State
- 14.4: Zustand for Practical Global State
- 14.5: Redux Toolkit for Large-Scale Applications
- Summary of State Management Strategy
- Next Chapter Preview: Data Fetching with React Query
Chapter 15: Data Fetching with React Query
- 15.1: Why React Query Exists
- 15.2: useQuery Fundamentals
- 15.3: Query States and Lifecycle
- 15.4: Caching and Background Refetching
- 15.5: useMutation for Writes
- 15.6: Query Invalidation and Synchronization
- 15.7: When React Query Should Be Used
- Summary
- Next Chapter Preview: Chapter 16 - Styling in React
Chapter 16: Styling in React
- 16.1: Thinking about styling in component-based UI
- 16.2: CSS Modules for scoped styling
- 16.3: Styled Components and CSS-in-JS
- 16.4: Tailwind CSS and utility-first styling
- 16.5: Component libraries and design systems
- 16.6: shadcn/ui and modern composable design systems
- 16.7: Choosing the right styling approach
- 16.8: Mini architecture summary
- Chapter 17 Preview: Forms in Depth
Chapter 17: Forms in Depth
- 17.1: Why forms need a different approach
- 17.2: The core problem with manual form state
- 17.3: React Hook Form mental model
- 17.4: Introducing Zod for validation
- 17.5: Connecting React Hook Form with Zod
- 17.6: Data flow in this setup
- 17.7: Error handling model
- 17.8: When to use this approach
- 17.9: Architectural view
- 17.10: Common mistakes to avoid
- 17.11: Next chapter preview
Chapter 18: React 18+ Concurrency
- 18.1: Automatic Batching and Rendering Behavior
- 18.2: startTransition for Non-Blocking Updates
- 18.3: useDeferredValue for Smoother UI Updates
- 18.4: Suspense for Data Loading (Conceptual Introduction)
- Next Chapter Preview: Chapter 19
Chapter 19: Build Tools & Next.js
- 19.1: Vite vs Webpack
- 19.2: Environment Variables
- 19.3: Introduction to Next.js
- 19.4: Deployment (Vercel and Netlify)
- End of Chapter Summary
- Next Chapter Preview: Chapter 20 – Real World Patterns
Chapter 20: Real-World Patterns
- 20.1: Error Boundaries
- 20.2: Lazy Loading and Code Splitting
- 20.3: Portals for UI Outside the DOM Hierarchy
- 20.4: Render Props and Higher Order Components
- Chapter Summary
- Next Chapter Preview: Chapter 21 – The Final Hero Project
Chapter 21: The Final Project
- 21.1: What you are building
- 21.2: High level architecture
- 21.3: Feature set breakdown
- 21.4: Implementation approach
- 21.5: Testing and deployment
- Closing thoughts