React组件生命周期的方法未按预期正确调用

时间:2016-08-18 13:43:05

标签: reactjs react-native react-router

参考:http://busypeoples.github.io/post/react-component-lifecycle/

我是React Native的新手。

我在main.js中有Navigator,我在该导航器中路由了两页。

从第一页导航到第二页时,第一页调用componentWillReceiveProps()到componentDidUpdate()的循环方法。

它不应该打电话,因为第一页上没有任何道具正在改变。甚至第一页的render()方法也被调用。我只想简单地转到第二页。

0 个答案:

没有答案