I'm using the Material Top Tab Navigator from React Native Navigation, created with createMaterialTopTabNavigator(). As per the documentation, this function accepts a TabNavigatorConfig object as the second argument, which has a property swipeEnabled determining if you should be able to swipe between the different tabs.
The issue is, I normally want the swipe behavior enabled, but only want to disable it under certain circumstances. Is there a way to toggle this between true and false dynamically once a certain event is triggered in one of the tabs?
You need to use React Navigation 5 (currently alpha) for dynamic configuration:
https://next.reactnavigation.org/