Jump to ratings and reviews
Rate this book

Learn React Hooks: Unlock scalable state, performance, and clean code with Hooks, Context, Suspense, and Form Actions

Rate this book
Grasp the core concepts of React Hooks and enhance your development workflow with best practices and advanced patterns derived from modern React 19 features

Key FeaturesBuild custom Hooks to simplify complex logic and promote code reusabilityTransform class components into modern, hook-based function components, and write robust testsBuild maintainable, production-ready UIs using React 19's declarative approach and ecosystem toolsPurchase of the print or Kindle book includes a free PDF eBookBook DescriptionReact Hooks allow you to easily encapsulate, reuse, and refactor logic with the same level of simplicity that components bring to user interface organization.

In this second edition, React expert and author of many popular React books, Daniel Bugl guides you through the full spectrum of React Hooks, and teaches you how to handle forms, routing, and data fetching in modern React development. This edition is fully updated to React 19, with a revamped structure, expanded real-world use cases, and coverage of all newly introduced Hooks.

Starting with the fundamentals, you'll gain a deep understanding of how Hooks work under the hood and how to apply Hooks patterns efficiently. The chapters guide you through using State, Reducer, and Effect Hooks to manage application state, side effects, and complex logic for building your first Hook-based app. You'll utilize Suspense and Context APIs for streamlined data fetching and state management, master Form Actions for handling submissions, and implement routing with Hooks. You’ll also create custom Hooks for advanced functionality and write tests for reliability. Finally, you’ll learn how to refactor an existing app with class components into modern Hooks architecture.

By the end of this React book, you'll be well-equipped to use React Hooks to modernize and optimize your React projects.

What you will learnMaster and apply new React 19 Hooks, such as useActionState, useFormStatus, useOptimistic, and othersUse React Hooks and Context to manage state in your web applicationsEfficiently fetch, update, and cache data using TanStack Query and SuspenseManage user input and form submission using Form Actions with HooksDiscover how to implement routing in your apps using React Router and HooksCreate and test your own Hooks to encapsulate, reuse, and refactor logic in your appsWho this book is forThis book is ideal for React developers looking to modernize their applications using React Hooks, Context, and Suspense. Beginners and experienced developers alike will gain a solid understanding of Hooks and their internal workings. If you're familiar with React and JavaScript, this book will help you upskill by teaching you best practices, performance optimization, and scalable application building. No prior experience with Hooks is required—this book covers everything from fundamentals to advanced patterns.

Table of ContentsIntroducing React and React HooksUsing the State HookWriting Your First Application with React HooksUsing the Reducer and Effect HooksImplementing React ContextsUsing Hooks and React Suspense for Data FetchingUsing Hooks for Handling FormsUsing Hooks for RoutingAdvanced Hooks Provided by ReactUsing Community HooksRules

372 pages, Paperback

Published May 23, 2025

2 people want to read

About the author

Daniel Bugl

4 books2 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
1 (100%)
4 stars
0 (0%)
3 stars
0 (0%)
2 stars
0 (0%)
1 star
0 (0%)
No one has reviewed this book yet.

Can't find what you're looking for?

Get help and learn more about the design.