react 生命周期

  • props 变化时候 需要更新,用 static getDerivedStateFromProps
static getDerivedStateFromProps(props, state)  {
}
posted @ 2019-12-19 13:38  Running00  阅读(69)  评论(0编辑  收藏  举报