2017-08-17 72 views

回答

1

导航到屏幕时,您可以设置新的参数。这导致反应导航来调用渲染。

下面是来自反应导航文档的例子:

<Button 
     onPress={() => navigate('Profile', {name: 'Brent'})} 
     title="Go to Brent's profile" 
    /> 

的第二个参数navigate是params对象。如果你随意放置一些东西,每次调用它时都会导致渲染。