-
單頁app的挑戰
查看全部 -
開始查看全部
-
reacrt生命周期函數:
componentWillMount
componentDidMount
componentWillUnmount
componentWillUpdate
shouldComponentUpdate
componentWillReceiveProps
查看全部 -
this.setState 相當于vue的 this.$set()
查看全部 -
類似vue的鉤子函數:
getInitialState
componentDidMount
查看全部 -
組件顯示可配置化:
查看全部 -
組件顯示可配置化:
查看全部 -
把界面的樣式設計模式與邏輯業務整合查看全部
-
componentWillUnmount: 通知組件將要被刪除,釋放內存文件句柄定時器;將組件從 dom 里拿掉
查看全部 -
getInitState: 放到construct里
getDefaultProps: 改寫 static defaultProps=()
查看全部 -
生命周期函數
查看全部 -
12345
查看全部 -
toLocaleString:把數組轉換為本地字符串。
查看全部 -
//寫法不更新頁組件
// this.setState={
// ? ? strikers: this.state.strikers + 100
// }
this.setState({
strikers: this.state.strikers + 100
})
查看全部 -
setState :與state 融合若沒有的屬性會添加,如重復則會替換掉
查看全部
舉報