When use ComponentDidMount() I found this error : Can't call setState

前端 未结 3 1951
慢半拍i
慢半拍i 2020-12-20 10:22

I found this error :

Can\'t call setState (or forceUpdate) on an unmounted component. This is a no-op, but it indicates a memory leak in your applica

3条回答
  •  抹茶落季
    2020-12-20 10:51

    You cannot call setState in componentWillMount try using componentDidMount instead

提交回复
热议问题