2017-08-17 73 views

回答

1

導航到屏幕時,您可以設置新的參數。這導致反應導航來調用渲染。

下面是來自反應導航文檔的例子:

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

的第二個參數navigate是params對象。如果你隨意放置一些東西,每次調用它時都會導致渲染。