Skip to Content
React学习手册
book

React学习手册

by Alex Banks, Eve Porcello
December 2017
Intermediate to advanced
329 pages
6h 9m
Chinese
China Electric Power Press Ltd.
Content preview from React学习手册
62
4
React
进阶
为了了解
React
在浏览器中的运行机制,本章将会单独介绍
React
。下一章将会介绍
JSX
,即
JavaScript
下的
XML
格式。也许读者已经和
React
打过交道,但是从未看过将
JSX
格式的代码转译成
React
源码。用户完全可以在不了解
React
源码的情况下放心使
React
。不过,如果你希望花时间了解应用场景背后的具体细节,那么将会有助于
提高开发效率,特别是在查找代码
Bug
时。这也是本章的目标:了解
React
内部的运行
机制。
建立页面
为了在浏览器中使用
React
,我们需要引用两种类库:
React
ReactDOM
React
库是
用来创建视图的。
ReactDOM
库是用来在浏览器中渲染
UI
的。
ReactDOM
0.14
版时,
React
ReactDOM
被一分为二独立打包了。发行说明指出:
React
的美丽和精髓和浏览器、
DOM
的关联甚少,这个
(
一分为二
)
方式,为编
写能够在
React
React Native
应用之间的
Web
版本实现组件共享铺平了道路”。
1
React
将不仅限于在浏览器中进行元素渲染,未来的版本将会支持多平台的元素
渲染。
1
Ben Alpert,
React v0.14
”(
http://bit.ly/2nvPHEQ
React blog, October 7, 2015
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

React快速上手开发

React快速上手开发

Stoyan Stefanov
C++语言导学(原书第2版)

C++语言导学(原书第2版)

本贾尼 斯特劳斯特鲁普

Publisher Resources

ISBN: 9787519814236