更新时间:2021-06-11 18:28:54
封面
版权信息
Preface
1. Getting Started with React
Introduction
Problems before React
Introducing React
Using Create React App to Create Our Project
Introduction to JSX
Creating a React Component
Summary
2. Dealing with React Events
Introduction – Talking to JavaScript with React
Designing the State of Our Application
Quick UI Examples
Getting Started – Building Our Baseline Component
Event Handlers in React
Context of Event Handlers
Form Validation in React
3. Conditional Rendering and for Loops
Conditional Rendering
Nested Conditional Rendering
4. React Lifecycle Methods
Overview of the Component Lifecycle
The Mount Lifecycle
The Update Lifecycle
The Unmount Lifecycle
5. Class and Function Components
Introduction to Thinking with React Components
Building React Components
Class Components
Function Component
Differences between Class and Function Components
6. State and Props
State in React
Props in React
7. Communication between Components
Getting Started
Higher-Order Components
Render Props
The Context API
8. Introduction to Formik
Uncontrolled Components
Controlled Components
Introduction to Formik
Formik Higher-Order Components
9. Introduction to React Router
Understanding Browser Routing
Basics of React Router
10. Advanced Routing Techniques: Special Cases
React Router Special Cases
11. Hooks – Reusability Readability and a Different Mental Model
Hooks
Comparing useEffect Hooks with Life Cycle Methods
Comparing Hooks to Render Props
12. State Management with Hooks
useState Hook: A Closer Look
Limitations of useState
Using the useReducer Hook
13. Composing Hooks to Solve Complex Problems
Context API and Hooks
14. Fetching Data by Making API Requests
RESTful API
Different Ways of Requesting Data
Axios
Comparison of XMLHttpRequest the Fetch API and Axios
Testing APIs with Postman
Making API Requests in React
Fetching Data with React
15. Promise API and async/await
What Is the Promise API?
What Is async/await?
16. Fetching Data on Initial Render and Refactoring with Hooks