The Advanced Road to React cover

The Advanced Road to React

Rating 3.8
Word count
403K words
Chapters
40
ISBN
9787302498018

Tags

Summary

The Advanced Road to React is an original Chinese technical book that systematically explains the React technology stack. The book is divided into three parts—Fundamentals, Advanced Topics, and Practice—connecting the most commonly used technologies in the React ecosystem from easy to difficult. The Fundamentals part begins with React's design philosophy, first supplementing ES6 syntax, introducing the development environment and the Create React App scaffolding, then explaining JSX, component definition, props and state, stateful and stateless components, property validation and default properties, component styling, lifecycle, lists and keys, event handling, and controlled and uncontrolled forms. A dedicated chapter covers new features in React 16, including the new return types for render (Fragments and arrays), error boundaries, Portals, and custom DOM attributes. The Advanced Topics part focuses on "what you must know to use React well": how to design appropriate state, correctly modify state and immutable objects, how components communicate with the server during mounting and updating, parent-child and sibling component communication and Context, and the special ref. It then delves into the virtual DOM, the diff algorithm and performance optimization, performance measurement tools, and the basic concepts, use cases, parameter passing, inheritance-based implementation, and caveats of higher-order components. The Practice part is built around a simple BBS project close to a real-world scenario: developing a single-page application with React Router 4, covering route configuration, links, the login page, the post list page and detail page, and code splitting; using Redux for predictable state management, explaining actions, reducers, stores, react-redux's connect, mapStateToProps, mapDispatchToProps, Provider, middleware, and asynchronous operations, and completing state design, module splitting, connection and debugging, and performance optimization in the project; and finally introducing the main components of MobX, common reactivity pitfalls, view-layer refactoring, and a comparison of Redux and MobX.

Editor's review

很多 React 书只讲“怎么写 JSX”,这本书难得地把“为什么这样写”和“在项目里怎么用”连成了一条线。作者徐超是长期做前端与移动 Hybrid 开发的一线工程师,行文偏工程视角,示例代码密度高,几乎每个知识点都配可运行的小例子。 最值得称道的是结构:基础篇负责打地基,进阶篇专门解决初学者最容易卡住的地方——state 怎么设计、什么时候该用不可变对象、父子与兄弟组件如何通信、ref 有什么坑、虚拟 DOM 与 Diff 算法到底在做什么、高阶组件如何既复用逻辑又不污染 props;实战篇则用一个接近真实业务的简易 BBS 项目,把 React Router、Redux、MobX 依次接进同一个应用,读完能清楚看到三者各自的位置与取舍。 此外,书中覆盖的是 React 16 与 React Router 4 时代的主流写法,主动略去了已废弃的旧 API,对当时读者的时效性较好。需要提醒的是,如果你现在使用的是 Hooks 与函数组件为主的写法,本书的类组件风格会显得偏旧,更适合作为理解 React 底层概念与状态管理思想的参考,而非最新 API 手册。

Who it's for

A good fit for

  • 已掌握 HTML、CSS、JavaScript 基础,想系统入门 React 的前端新人
  • 有少量 React 使用经验,但想弄清 state、生命周期、虚拟 DOM 原理的开发者
  • 需要在项目中引入 Redux 或 MobX 做状态管理的工程师
  • 想通过一个完整小项目理解 React 单页应用架构的转型开发者

Not a good fit for

  • 完全没有 JavaScript 基础、连 ES 6 语法都不熟悉的零基础读者
  • 只想查阅 React Hooks、并发特性等最新 API 的资深前端
  • 从事 Android、iOS 原生开发、不涉及 Web 前端技术栈的读者

Reading tips

  1. 先过一遍第1、2章自测基础,JSX、props、state 已熟练的读者可直接从第4章读起。
  2. 进阶篇建议配合官方文档对照阅读,虚拟 DOM、Diff 算法部分手动调试示例代码加深理解。
  3. 实战篇请把 BBS 项目完整敲一遍,并尝试把 Redux 版本改写为 MobX 版本以体会两者差异。
  4. 阅读时留意书中类组件写法与当前 Hooks 写法的差异,可用 Hooks 重写部分示例作为练习。

About the publisher

Tsinghua University Press China · Founded in 1980

Founded in 1980, Tsinghua University Press has 57 titles in our collection, covering popular science, medicine, health, law, philosophy and social sciences. Representative works include medical popular-science books such as Cancer Truth: Doctors Are Reading It Too and New Knowledge on Cancer by Bo Luo (Li Zhizhong), legal titles such as Sunshine Is the Best Preservative: Express Delivery of Major Global Anti-Corruption Cases, and works like Qi Ge's A Brief History of Philosophy with Big Ideas and Liu Yunhao's From the Internet to a New Industrial Revolution. Its authors include science writers, medical researchers, the Renmin University of China anti-corruption master's class and university scholars, reflecting a publishing profile that balances academic seriousness with accessible reading. As public information is limited, this profile is based only on the titles in our collection.

Contents

  1. Part 1 Fundamentals—React, a Revolutionary UI Development Philosophy
  2. Chapter 1 Getting to Know React
  3. 1.1 Introduction to React
  4. 1.2 Introduction to ES6 Syntax
  5. 1.3 Development Environment and Tools
  6. Chapter 2 React Fundamentals
  7. 2.1 JSX
  8. 2.2 Components: props, state, property validation and default properties, component styling
  9. 2.3 Component Lifecycle
  10. 2.4 Lists and Keys
  11. 2.5 Event Handling
  12. 2.6 Forms: Controlled and Uncontrolled Components
  13. Chapter 3 New Features in React 16
  14. 3.1 New Return Types for render
  15. 3.2 Error Handling
  16. 3.3 Portals
  17. 3.4 Custom DOM Attributes
  18. Part 2 Advanced Topics—What You Must Know to Use React Well
  19. Chapter 4 Understanding Components in Depth
  20. 4.1 Component State: Designing Appropriate State, Correctly Modifying State, State and Immutable Objects
  21. 4.2 Component-Server Communication
  22. 4.3 Component Communication: Parent-Child Components, Sibling Components, Context
  23. 4.4 The Special ref
  24. Chapter 5 Virtual DOM and Performance Optimization
  25. 5.1 Virtual DOM
  26. 5.2 Diff Algorithm
  27. 5.3 Performance Optimization
  28. 5.4 Performance Measurement Tools
  29. Chapter 6 Higher-Order Components
  30. 6.1 Basic Concepts
  31. 6.2 Use Cases
  32. 6.3 Parameter Passing
  33. 6.4 Implementing Higher-Order Components by Inheritance
  34. 6.5 Caveats
  35. Part 3 Practice—Using React in Large Web Applications
  36. Chapter 7 Routing: Developing Single-Page Applications with React Router
  37. 7.1 Basic Usage: Single-Page Applications and Front-End Routing, Routers, Route Configuration, Links
  38. 7.2 Project Practice: Backend Service APIs, Route Design, Login Page, Post List Page, Post Detail Page
  39. 7.3 Code Splitting
  40. Chapter 8 Redux: A Predictable State Management Machine

FAQ

这本书的作者和出版社是?
《React进阶之路》由徐超著,清华大学出版社 2018 年 4 月出版,ISBN 为 9787302498018,全书约 403 千字、242 页,定价 69 元。作者毕业于浙江大学,是一名资深前端工程师。
这本书和《深入React技术栈》是同一本吗?
不是。《深入React技术栈》的作者是陈屹,由人民邮电出版社出版;《React进阶之路》的作者是徐超,由清华大学出版社出版。两本书题材相近但内容与结构不同,购买时请认准作者与 ISBN。
零基础可以直接读这本书吗?
不太合适。书中在前言明确要求读者先掌握基础的前端开发知识,第1章也只用很短篇幅带过 ES 6 语法。建议先具备 HTML、CSS、JavaScript 与 ES 6 基础,再阅读此书会顺畅得多。
书中的技术栈现在还有参考价值吗?
书中基于 React 16 与 React Router 4,并讲解 Redux、MobX 的核心概念与项目组织方式,这些思想依然适用。但组件写法以类组件为主,缺少 Hooks 内容,建议与官方最新文档配合阅读。
书里的项目实战是什么规模?
实战篇围绕一个简易 BBS 项目展开,包含登录页、帖子列表页、帖子详情页等模块,分别用 React Router、Redux 和 MobX 实现,刻意做了简化,便于在理解技术用法的同时不被业务复杂度干扰。

Comments

Find this book

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

About the author

徐超 Author

Xu Chao is a Chinese author whose signed works span a notably wide range of subjects. Public information about him is limited, and his nationality, dates of birth and death, and educational background are not clearly recorded. Judging from the five works held in the collection, his writing covers literary appreciation, culture, examinations, industrial technology, and personal finance: traditional-culture interpretations centered on Jia Yi and his writings and on a general explanation of ancient Chinese characters; a textbook on algorithms and data structures for higher vocational college readers; and practical discussions extending to investment value across China's automotive industry chain and the allocation of large life-insurance policies. This range across the humanities, technical education, and finance suggests a writer oriented toward knowledge popularization and practical guidance rather than specialized work in a single field. Overall, his books address different readerships and combine organized knowledge with operational reference, showing a notable emphasis on accessibility and readability.

More by the same author

Top rated in the same category