rn分享

转至元数据结尾

转至元数据起始

#### 什么是 React

* React 是一个用于构建用户界面的 JavaScript 库。

* 声明式UI

#### JSX

[JSX](https://zh-hans.reactjs.org/docs/jsx-in-depth.html)

#### Component

* Props

* State

* 生命周期 [图例](https://projects.wojtekmaj.pl/react-lifecycle-methods-diagram/)

#### shouldComponentUpdate

* react 的核心卖点之一

* setState (只要调用了 setState 就会调用 render 无论你 setState 修改的是什么,哪怕是页面里没有的一个数据,render 都会被触发,并且父组件渲染中会嵌套渲染自、子组件。)

* render

* diff | reconciliation

官方一点的定义应该称为 reconciliation,也就是 React 用来比较两棵节点树的算法,它确定树中的哪些部分需要被更新。

在确定两棵树的区别后,会根据不同的地方对实际节点进行操作,这样你看到的界面终于在这一步得到了改变。当年 React 也就因为这个高效的 dom 操作方法得到追捧。

* shouldComponentUpdate

#### PureComponent

#### Context

#### Ref

[refs 转发](https://zh-hans.reactjs.org/docs/forwarding-refs.html)

#### Fragment

[fragment](https://zh-hans.reactjs.org/docs/fragments.html#short-syntax)

#### 高阶组件

[高阶组件](https://zh-hans.reactjs.org/docs/higher-order-components.html)

#### 协调与 diff

[diffing](https://zh-hans.reactjs.org/docs/reconciliation.html)

### react hook

### 如何查看ReactNative 的源码

你可能感兴趣的:(rn分享)