react.js constructor called twice

后端 未结 3 1929
北恋
北恋 2020-12-18 10:51

I a have post list and I am trying to call an action inside of constructor or componentDidMount for each post. But somehow when I send a new message constructor and componen

3条回答
  •  感动是毒
    2020-12-18 11:09

    Well, when your constructor and your componentDidMount function both fire twice you can be sure that the component in question is constructed twice somewhere.

提交回复
热议问题