Search code examples
react-nativereduxreact-reduxback

How enable or disable swipe back in react-native with redux


i want be able to enable or disable this action:

enter image description here

This works perfect in react-native without redux, but when i add redux this action not works and come back again like the gif

I'm following this links but in this cases, this works with Navigator but i'm not using this prop. i'm using NavigationExperimental.

Thanks for help.


Solution

  • To disable gestures in NavigationExperimental CardStack, use it like this:

    render () {
      <CardStack
        navigationState={navigationState}
        ... other properties
        enableGestures={false}
      />
    }
    

    For more info (for RN 0.40) see sources NavigationCardStack.js