售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
React 16 Essentials Second Edition
React 16 Essentials Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
eBooks, discount offers, and more
Why subscribe?
Customer Feedback
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. What's New in React 16
Rethinking rendering
The status quo
Running to completion
What are fibers?
Async and the road ahead
Better component error handling
Rendering multiple elements and strings
Rendering to portals
Summary
2. Installing Powerful Tools for Your Project
Approaching our project
Installing Node.js and npm
Installing Git
Getting data from the Twitter Streaming API
Filtering data with Snapkite Engine
Creating the project structure
Creating package.json
Reusing Node.js modules
Building with Webpack
Creating a web page
Summary
3. Creating Your First React Element
Understanding the virtual DOM
Installing React
Creating React elements with JavaScript
The type parameter
The props parameter
The children parameter
Rendering React elements
Creating React elements with JSX
Summary
4. Creating Your First React Component
Stateless versus stateful
Creating your first stateless React component
Creating your first stateful React component
Summary
5. Making Your React Components Reactive
Solving a problem using React
Planning your React application
Creating a container React component
Summary
6. Using Your React Components with Another Library
Using another library in your React component
Understanding React component's lifecycle methods
Mounting methods
The componentWillMount method
The componentDidMount method
Unmounting methods
The componentWillUnmount method
Summary
7. Updating Your React Components
Understanding component lifecycle updating methods
The componentWillReceiveProps method
The shouldComponentUpdate method
The componentWillUpdate method
The componentDidUpdate method
Setting default React component properties
Validating React component properties
Creating a Collection component
Summary
8. Building Complex React Components
Creating the TweetList component
Creating the CollectionControls component
Creating the CollectionRenameForm component
Creating the Button component
Creating the CollectionExportForm component
Summary
9. Testing Your React Application with Jest
Why write unit tests?
Creating test suites, specs, and expectations
Installing and running Jest
Creating multiple tests and expectations
Testing React components
Summary
10. Supercharging Your React Architecture with Flux
Analyzing your web application's architecture
Understanding Flux
Creating a dispatcher
Creating an action creator
Creating a store
Summary
11. Preparing Your React Application for Painless Maintenance with Flux
Decoupling concerns with Flux
Refactoring the Stream component
Creating CollectionStore
Creating CollectionActionCreators
Refactoring the Application component
Refactoring the Collection component
Refactoring the CollectionControls component
Refactoring the CollectionRenameForm component
Refactoring the TweetList component
Refactoring the StreamTweet component
Building and going beyond
Summary
12. Refining Your Flux Apps with Redux
Why Redux?
One store to rule them all
Fewer moving parts
Uses the best parts of Flux
Controlling state with reducers
What are reducers?
Collection reducers
Adding tweets to collections
Removing tweets from collections
Setting the collection name
Editing collection names
Tweet reducers
Receiving tweets
Simplified action creators
Connecting components to an application state
Mapping state and action creators to props
Connecting the stream component
Connecting the StreamTweet component
Connecting the collection component
Connecting collection controls
Connecting the TweetList component
Creating stores and wiring your app
Summary
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜