react componentDidMount not firing

前端 未结 9 965
南方客
南方客 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:26

    You need to change your module.exports to point at RecipePage not TestPage

    module.exports = RecipePage;
    

提交回复
热议问题