-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What is react? #41
Comments
就像所有的component都实现了mountComponent来处理第一次渲染,所有的componet类都应该实现receiveComponent用来处理自己的更新。
|
1. createElement用法
输入type,config,children 输出
2. createClass用法
输入包含render方法的对象。 输出一个构造函数 3.
|
react diffdiff 策略
基于以上三个前提策略,React 分别对 tree diff、component diff 以及 element diff 进行算法优化,事实也证明这三个前提策略是合理且准确的,它保证了整体界面构建的性能。
——twobin |
component 分类总结: Presentational and Container Components – Dan Abramov – Medium
|
React Internals, Part Three: basic updating - Matt Greerrender(总)
DOMComponent receiveComponentCompositeComponent receiveComponentReact Internals, Part Four: setState - Matt Greer |
React Internals阅读重点
To avoid the confusion, we will call instances of CompositeComponent and DOMComponent “internal instances”. They exist so we can associate some long-lived data with them. Only the renderer and the reconciler are aware that they exist. |
feact重点
basic updatecompositeComponent的 代码如下updateComponent(prevElement, nextElement){
this._currentElement = nextElement;
this._instance.props = nextElement.props; //更新此Component的props
//update rendered component
const nextRenderedElement = this._instance.render(); // 重新执行此Component的render
this._renderedComponent.receiveComponent(nextRenderedElement) // childComponentInstance开始更新
} 用人话说,就是
收获
setState
实现中,遇到的问题basic update 时,dom |
定义
源码探究
reactjs源码分析-上篇(首次渲染实现原理)
reactjs源码分析-下篇(更新机制实现原理)
深入理解react(源码分析)
React源码分析3 — React生命周期详解
资源集合
brillout/awesome-react-components
vasanthk/react-bits
名词解释
对...做出反应
接受
不知道哪个更准确
Question
Building React From Scratch - YouTube
The text was updated successfully, but these errors were encountered: