React Navigation v3 具有一个initialRouteParams属性,用于将初始值传递给this.navigation.props。有没有办法在 React Navigation v5 中设置要通过route.params访问的初始路由参数?
function MainScreen({route, navigation}) {
return (
// how to pass default values to route in here?
// route.params.userParam ?
...
);
}