react componentDidMount not firing

前端 未结 9 977
南方客
南方客 2020-12-15 14:47

I set up a new react project and for some reason, the componentDidMount method is not being called.

I have verified this behavior by placing a call to

9条回答
  •  南笙
    南笙 (楼主)
    2020-12-15 15:39

    For me I also declared componentDidUpdate in the class after that componentDidMount started firing as expected.

提交回复
热议问题