售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Getting Started with React
Table of Contents
Getting Started with React
Credits
About the Authors
Acknowledgments
About the Reviewers
www.PacktPub.com
eBooks, discount offers, and more
Why subscribe?
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. Getting Started with ReactJS
Introducing ReactJS
Who uses ReactJS?
Downloading ReactJS
Installing ReactJS with NPM
Installing ReactJS with Bower
Tools
Text editors
Chrome extension
Trying ReactJS
Configuring ReactJS in a web page
Creating your first React component
Configuring JSX
Serving files through the web server
Creating a React component with the JSX syntax
Summary
2. Exploring JSX and the ReactJS Anatomy
What is JSX?
Why JSX?
Tools for transforming JSX
The ReactJS anatomy
Creating a component
Rendering a component
Maximum number of roots
Children components
Supported attributes
Supported elements
HTML elements
SVG elements
Learning JSX and Gotchas
Expressions
Properties/attributes
Transferring properties
Mutating properties
Comments
Component style
Style
CSS classes
Summary
3. Working with Properties
Component properties
Data flow with properties
Configuring Facebook Open-Graph API
What it is and how to configure it
Creating an app-id on the Facebook developers site
Open-Graph JavaScript SDK
Rendering data in a ReactJS component
Summary
4. Stateful Components and Events
Properties versus states in ReactJS
Exploring the state property
Initializing a state
Setting a state
Replacing a state
A React state example using an interactive form
Events
Form events
Mouse events
nativeEvent
Event pooling
Supported events
Summary
5. Component Life cycle and Newer ECMAScript in React
React component lifecycle
Mounting category
Updating category
Unmounting category
Other ES (ECMAScript) versions in React
ES6
ES7
Summary
6. Reacting with Flux
An overview of Flux
Flux versus the MVC architecture
Flux advantages
Flux components
Actions
Dispatchers
Stores
Controller-Views and Views
Revisiting the code
Summary
7. Making Your Component Reusable
Understanding Mixins
Exploring Mixins by example
Higher-order components in Mixins
Validations
An example using the isRequired validator
An example using custom validator
The structure of component
Summary
8. Testing React Components
Testing in JavaScript using Chai and Mocha
Testing using ReactTestUtils
Installing React and JSX
The jestTypical example of a Testsuite with Mocha, expect, ReactTestUtils and Babel
Testing with shallow rendering
Summary
9. Preparing Your Code for Deployment
An introduction to Webpack
Building a simple React application
Setting up Webpack
Advantages of Webpack
Introduction to Gulp
Installing Gulp and creating Gulp file
Summary
10. What's Next
AJAX in React
React Router
Server-side rendering
ReactDOMServer
Isomorphic applications
Hot reloading
Redux React
Relay and GraphQL
React Native
References
Summary
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜