React Key Concepts

by Maximilian SchwarzmĂĽller

Programming

Book Details

Book Title

React Key Concepts

Author

Maximilian SchwarzmĂĽller

Publisher

Packt Publishing

Publication Date

2025

ISBN

9781836202271

Number of Pages

545

Language

English

Format

PDF

File Size

5.9MB

Subject

Computers>Programming

Table of Contents

  • Cover
  • Copyright Page
  • Contributors
  • Table of Contents
  • Preface
  • Chapter 1: React – What and Why
  • Introduction
  • What is React?
  • The Problem with “Vanilla JavaScript”
  • React and Declarative Code
  • Introducing SPAs
  • Summary and Key Takeaways
  • Chapter 2: Understanding React Components and JSX
  • Introduction
  • What Are Components?
  • What Does React Do with All These Components?
  • JSX vs HTML vs Vanilla JavaScript
  • Moving Beyond Static Content
  • When Should You Split Components?
  • Summary and Key Takeaways
  • Apply What You Learned
  • Chapter 3: Components and Props
  • Introduction
  • Can Components Do More?
  • Using Props in Components
  • Components, Props, and Reusability
  • Summary and Key Takeaways
  • Apply What You Learned
  • Chapter 4: Working with Events and State
  • Introduction
  • What’s the Problem?
  • Updating State Correctly
  • Working with Multiple State Values
  • Deriving Values from State
  • Summary and Key Takeaways
  • Apply What You Learned
  • Chapter 5: Rendering Lists and Conditional Content
  • Introduction
  • What Are Conditional Content and List Data?
  • Rendering Content Conditionally
  • Outputting List Data
  • Summary and Key Takeaways
  • Apply What You Learned
  • Chapter 6: Styling React Apps
  • Introduction
  • How Does Styling Work in React Apps?
  • The Problem with Unscoped Styles
  • Summary and Key Takeaways
  • Apply What You Learned
  • Chapter 7: Portals and Refs
  • Introduction
  • A World without Refs
  • Refs versus State
  • Using Refs for More than DOM Access
  • React and Where Things End up in the DOM
  • Summary and Key Takeaways
  • Apply What You Have Learned
  • Chapter 8: Handling Side Effects
  • Introduction
  • What’s the Problem?
  • Understanding Side Effects
  • Dealing with Side Effects with the useEffect() Hook
  • Effects and Their Dependencies
  • Summary and Key Takeaways
  • Apply What You Learned
  • Chapter 9: Handling User Input & Forms with Form Actions
  • Introduction
  • Handling Form Submissions without Actions
  • Handling Form Submissions with Actions
  • Behind the Scenes: Actions Are Transitions
  • Managing State Based on Form Submissions
  • Performing Optimistic Updates
  • Summary and Key Takeaways
  • Apply What You Learned
  • Chapter 10: Behind the Scenes of React and Optimization Opportunities
  • Introduction
  • Revisiting Component Evaluations and Updates
  • The Virtual DOM vs the Real DOM
  • Avoiding Unnecessary Code Download
  • Strict Mode
  • Debugging Code and the React Developer Tools
  • Summary and Key Takeaways
  • Apply What You Learned
  • Chapter 11: Working with Complex State
  • Introduction
  • A Problem with Cross-Component State
  • Using Context to Handle Multi-Component State
  • Using the Context API Efficiently
  • Limitations of useState()
  • Managing State with useReducer()
  • Summary and Key Takeaways
  • Apply What You Learned
  • Chapter 12: Building Custom React Hooks
  • Introduction
  • Introducing Custom Hooks
  • Custom Hooks: A Flexible Feature
  • A More Complex Example
  • Using Custom Hooks for Context Access
  • Summary and Key Takeaways
  • Apply What You Learned
  • Chapter 13: Multipage Apps with React Router
  • Introduction
  • One Page Is Not Enough
  • Getting Started with React Router and Defining Routes
  • From Static to Dynamic Routes
  • Redirecting
  • Summary and Key Takeaways
  • Apply What You Learned
  • Chapter 14: Managing Data with React Router
  • Introduction
  • Data Fetching and Routing Are Tightly Coupled
  • Loading Data with React Router
  • Layouts Revisited
  • Handling Errors
  • Onward to Data Submission
  • Summary and Key Takeaways
  • Apply What You Learned
  • Chapter 15: Server-side Rendering & Building Fullstack Apps with Next.js
  • Introduction
  • What’s the Problem with Client-Side React Apps?
  • Making Sense of Server-side Rendering (SSR)
  • Adding SSR to a React Application
  • Introducing Next.js
  • Diving Deeper into Next.js
  • Summary and Key Takeaways
  • Apply What You Learned
  • Chapter 16: React Server Components & Server Actions
  • Introduction
  • The Problem with Server-side Data Fetching
  • Introducing RSCs
  • From Data Fetching to Data Mutations
  • Summary and Key Takeaways
  • Apply What You Learned
  • Chapter 17: Understanding React Suspense & The use() Hook
  • Introduction
  • Showing Granular Fallback Content with Suspense
  • Suspense Usage Patterns
  • Should You Fetch Data via Suspense or useEffect()?
  • Summary and Key Takeaways
  • Test Your Knowledge!
  • Apply What You Learned
  • Chapter 18: Next Steps and Further Resources
  • Introduction
  • How Should You Proceed?
  • Final Words
  • Packt Page
  • Other Books You May Enjoy
  • Index