'Cannot switch back to bottom navigation from react-native-paper-tabs

Problem: I have build a structure using react-native-paper bottom navigation. One of the bottom tabs is ''Info" which is implemented using react-native-paper-tabs. It works fine when I get into it, but gives error when I switch back to my bottom tab navigator

For example Home -> Info (Works fine) {Also the swipe is working fine } ------x (Switching back to any bottom navigator option produces the error.)----

enter image description here

Now if I will try to switch back to any screen other than "Info" tab it will give error.

enter image description here

"@react-navigation/native": "^6.0.10", "@react-navigation/native-stack": "^6.6.1", "react": "17.0.2", "react-native": "0.68.0", "react-native-pager-view": "^5.4.15", "react-native-paper": "^4.12.0", "react-native-paper-tabs": "^0.7.0", "react-native-responsive-screen": "^1.4.2", "react-native-safe-area-context": "^4.2.4", "react-native-screens": "^3.13.1", "react-native-vector-icons": "^9.1.0"

Error Flow --> Bottom Navigation --> Any Screen with react-native-paper-tabs implementation -(Crashes with error)--> Switch back to any Bottom Navigation tab.

Thanks in advance.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source