P25 2.3.1 装载过程的疑问
chocolatl opened this issue · comments
chocolatl commented
2.3.1 装载过程
constructor
getInitialState
getDefaultProps
为什么getInitialState
在getDefaultProps
之前被调用,初始化组件的State不是需要依赖于Prop的默认值吗?
Morgan Cheng commented
这是一个错误,实际上getDefaultProps会在getInitialState之前被调用。