Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Learn React Hooks
  • Table Of Contents Toc
  • Feedback & Rating feedback
Learn React Hooks

Learn React Hooks - Second Edition

By : Bugl
close
close
Learn React Hooks

Learn React Hooks

By: Bugl

Overview of this book

React 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.
Table of Contents (19 chapters)
close
close
Lock Free Chapter
1
Introduction to Hooks
5
Using Hooks With Real-World Examples
13
Refactoring and Migrating Existing Code
17
Other Books You May Enjoy
18
Index

Preface

Hi there – I am Daniel, an entrepreneur, software development consultant, and full-stack developer with a focus on technologies in the React ecosystem.

In my time as a software development consultant and developer for enterprises and the public sector, I have observed a common challenge: developers often struggle with advanced React concepts due to a lack of in-depth understanding. Hooks in particular are a big source of confusion there. Often, it is hard to know what the best practices are and how to best structure and design an app with React and React Hooks.

In this book, I want to teach you everything you need to know to build a modern and maintainable frontend with React. I will teach Hooks from the ground up, to ensure that you understand their limitations and where they shine. I will cover various common use cases that I have frequently encountered in my career – such as managing application state, when and how to use React Contexts, data fetching, form handling, and routing. I will also teach you when and how to build your own Hooks to keep your app maintainable and efficiently reuse logic across multiple components. In my opinion, custom Hooks are often underutilized in projects, but they can bring immense value, especially in larger projects.

All of these concepts will be taught with practical examples so that you can immediately see them in action and start using them in your own projects. I sincerely hope you enjoy reading this book. If you have any questions or feedback, feel free to reach out to me!

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Learn React Hooks
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon