摘要:
PropTypes.element:指React Element,即React.CreateElement生成的元素,React.CreateElement可以用jsx语法糖表示: 编译后为: 因此PropTypes.element可以为以下类型:string | 组件实列(组件标签,例如上面的<M 阅读全文
摘要:
React16.3.0之前生命周期 16.3开始建议使用新的生命周期 新的生命周期增加了static getDerivedStateFromProps()以及getSnapshotBeforeUpdate(),废弃了原有的componentWillMount()、componentWillUpdat 阅读全文