Table of Contents....4
Foreword....6
About the Author....7
FAQ....8
Who is this book for?....10
How to read the book?....11
Fundamentals of React....13
Hello React....14
Requirements....16
Setting up a React Project....18
Project Structure....20
npm Scripts....22
Meet the React Component....24
React JSX....28
Linting with ESLint (Optional)....33
Lists in React....37
Meet another React Component....43
React Component Instantiation....47
React DOM....50
React Component Declaration....52
Handler Function in JSX....56
React Props....59
React State....62
Callback Handlers in JSX....66
Lifting State in React....69
React Controlled Components....75
Props Handling (Advanced)....77
React Side-Effects....88
React Custom Hooks (Advanced)....91
React Fragments....96
Reusable React Component....99
React Component Composition....102
Imperative React....105
Inline Handler in JSX....110
React Asynchronous Data....117
React Conditional Rendering....120
React Advanced State....125
React Impossible States....130
Data Fetching with React....135
Data Re-Fetching in React....138
Memoized Functions in React (Advanced)....142
Explicit Data Fetching with React....145
Third-Party Libraries in React....149
Async/Await in React....151
Forms in React....153
A Roadmap for React....157
React's Legacy....160
React Class Components....161
React Class Components: State....164
Imperative React....166
Styling in React....168
CSS in React....171
CSS Modules in React....177
Styled Components in React....183
SVGs in React....189
React Maintenance....193
Performance in React (Advanced)....194
TypeScript in React....205
Testing in React....218
React Project Structure....249
Real World React (Advanced)....255
Sorting....256
Reverse Sort....262
Remember Last Searches....265
Paginated Fetch....275
Deploying a React Application....285
Build Process....286
Deploy to Firebase....287
Outline....290
The Road to React: The React.js with Hooks in JavaScript Book (2024 Edition) - is a comprehensive and pragmatic yet concise React 18 with Hooks (+ opt-in TypeScript) book. Purchase of this book includes free online access to the always up-to-date digital book.
"The Road to React" made its debut in 2016, and since then, I've almost rewritten it annually. This book teaches the core principles of React, guiding you through building a practical application in pure React without complex tooling. The book covers everything from setting up the project to deploying it on a server. Each chapter includes additional recommended reading and exercises. By the end, you'll have the skills to develop your own React applications.
In "The Road to React," I establish a solid foundation before delving into the broader React ecosystem. The book clarifies general concepts, patterns, and best practices for real-world React applications. Ultimately, you'll learn to construct a React application from scratch, incorporating features such as pagination, client-side and server-side searching, and advanced UI interactions like sorting.
Programming books are usually outdated soon after their release, but since this book is self- published, I can update it as needed whenever a new version of something related to this book gets released.
Yes. The book starts from zero and takes you through the learning experience step by step. Every chapter builds up on the learnings from the previous chapter. In addition, at the end of every chapter, exercises fortify your lessons learned. If you got stuck in a chapter, you will always find a reference URL to the status quo of the actual code.