Invariant Violation:The navigation prop is missing for this navigator,In react-navigation 3.......

首先我使用的react-navigation是4.x版本,然后我的代码是这样的:
Invariant Violation:The navigation prop is missing for this navigator,In react-navigation 3.......经过查询因为react-navigation 3.x版本以上的createBottomTabNavigator是不能直接像上面代码暴露出来,所以出现此报错,需要使用createAppContainer包裹起来:
Invariant Violation:The navigation prop is missing for this navigator,In react-navigation 3.......