-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fa3676c
commit 2ea057d
Showing
6 changed files
with
95 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,31 @@ | ||
## React笔记 | ||
# React笔记 | ||
|
||
### 简介 | ||
|
||
React 是一个用于构建用户界面的 JavaScript 库。 | ||
|
||
React 主要用于构建UI,很多人认为 React 就是 MVC 中的 V(视图view)。 | ||
|
||
React 起源于 FaceBook 的一个内部项目,用来架设 Instagram 的网站,并于 2013 年 5 月开源。 | ||
|
||
### React 特点 | ||
|
||
1. **声明式设计:** React 采用声明范式,可以轻松描述应用。 | ||
2. **高效:** React 通过对 DOM 模拟,最大限度的减少与 DOM 的交互。 | ||
3. **灵活:** React 可以与已知的库或框架更好的配合。 | ||
4. **JSX:** JSX 是 JavaScript 的语法拓展,React 开发并不一定使用 JSX,但一般都推荐使用 JSX。 | ||
5. **组件:** 通过 React 构建组件,使得代码更加容易得到复用,能够良好的应用在大项目的开发中。 | ||
6. **单向响应的数据流:** React 实现了单向响应的数据流,从而减少了重复代码,这也是它为什么比传统的数据绑定更简单。 | ||
|
||
### React 安装使用 | ||
|
||
#### 使用 npm 安装 | ||
|
||
```sh | ||
|
||
npm install -g create-react-app | ||
|
||
create-react-app <项目名称> | ||
|
||
``` | ||
|