摘要:
注释掉 this.setState({val: this.state.val + 6}) 时:不注释掉 this.setState({val: this.state.val + 6}) 时: import React, { Component } from ... 阅读全文
摘要:
setState 通过引发一次组件的更新过程来引发重新绘制setState 方法被调用时,会引起 React 的 4 个生命周期的函数被调用: shouldComponentUpdate (this.state 没有得到更新) componentWillU... 阅读全文