更新时间:2021-07-09 19:29:19
封面
版权信息
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Dedication
Preface
Chapter 1. Why React?
What is React?
Simplicity is good
Declarative UI structure
Time and data
Performance matters
The right level of abstraction
Summary
Chapter 2. Rendering with JSX
What is JSX?
Just like HTML
Describing UI structures
Creating your own JSX elements
Using JavaScript expressions
Chapter 3. Understanding Properties and State
What is component state?
What are component properties?
Setting component state
Passing property values
Stateless components
Container components
Chapter 4. Event Handling – The React Way
Declaring event handlers
Event handler context and parameters
Inline event handlers
Binding handlers to elements
Synthetic event objects
Event pooling
Chapter 5. Crafting Reusable Components
Reusable HTML elements
The difficulty with monolithic components
Refactoring component structures
Rendering component trees
Feature components and utility components
Chapter 6. The React Component Lifecycle
Why components need a lifecycle
Initializing properties and state
Optimize rendering efficiency
Rendering imperative components
Cleaning up after components
Chapter 7. Validating Component Properties
Knowing what to expect
Promoting portable components
Simple property validators
Type and value validators
Writing custom property validators
Chapter 8. Extending Components
Component inheritance
Composition with higher-order components
Chapter 9. Handling Navigation with Routes
Declaring routes
Handling route parameters
Using link components
Lazy routing
Chapter 10. Server-Side React Components
What is isomorphic JavaScript?
Rendering to strings
Backend routing
Frontend reconciliation
Fetching data
Chapter 11. Mobile-First React Components
The rationale behind mobile-first design
Using react-bootstrap components
Chapter 12. Why React Native?
What is React Native?
React and JSX are familiar
The mobile browser experience
Android and iOS different yet the same
The case for mobile web apps
Chapter 13. Kickstarting React Native Projects
Using the React Native command-line tool
iOS and Android simulators
Running the project
Chapter 14. Building Responsive Layouts with Flexbox
Flexbox is the new layout standard
Introducing React Native styles
Building flexbox layouts
Chapter 15. Navigating Between Screens