Solvedreact native router flux Forbid swiping back

How to forbid swiping back for a scene ?

35 Answers

✔️Accepted Answer

@mvaivre to disable swiping back, passing panHandlers={null} worked for me, e.g:
<Scene key="modal" component={Modal} panHandlers={null}/>

Other Answers:

Looks like it is not in 0.22 release. Anyway i will post version that pass panHandlers to NavigationCard.

@aksonov How do I pass null to panHandlers?

Per ericvicenti/navigation-rfc#49 (comment) the gesture can be disabled by setting panHandlers to null. When I have a scene that pushed from bottom to top using direction='vertical', I don't want users to swipe down to pop the scene.

<NavigationCard panHandlers={null}/>

Thanks, brien-crean.
<Scene key="modal" component={Modal} panHandlers={null}/>
It works I'm using Route some thing like that.
<Route panHandlers={null} key="home" component={Home} />

Related Issues:

react native router flux Duplicate versions of react-native being installed
Got wrecked by this too Fixed with the rollback to 3.38.0 react-native-router-flux v3.38.1 react-nat...
react native router flux @providesModule naming collision error after installing react-native-router-flux
Same problem it works if you rollback to the previous version: yarn add react-native-router-flux@3.3...
react native router flux Help With Drawer Menu
Hi I implemented the Drawer from router-flux v4.0.0-beta.14 like this: (I couldnt find any info on h...
react native router flux Bundling error
Running packager like that resolves problem for me react-native start --reset-cache --verbose Verbos...
react native router flux Animations for transition on Android
To anyone who stumbles on to this thread - to get the old direction= behaviour back you can just add...
react native router flux Ability to provide the left/right navbar buttons from the rendered component
@jrwm thanks it works The current set up of the buttons is not ideal They have to be declared and ho...
react native router flux Back navigation won't work on Android
I solved this way: <Router backAndroidHandler={this.onBackPress}> and: I've noticed that on Android:...
react native router flux Fatal Exception: com.facebook.react.common.JavascriptException: TypeError: undefined is not an object (evaluating 'r.default')
run this package.json snippet in postinstall or manually before release: For older react-navigation ...
react native router flux Double-tapping fires Actions twice
This is a workaround I use for the moment: For every button that triggers a navigation action ...
react native router flux Problem about pop and refresh
Hello guys I have the same problem with tab scene too : componentWillReceiveProps is not triggered u...
react native router flux onEnter/onExit hooks inside scenes components
@aksonov Can you provide a sample code using onEnter inside a component? Thanks ...
react native router flux Forbid swiping back
@mvaivre to disable swiping back passing panHandlers={null} worked for me e.g: <Scene key=modal comp...
react native router flux ERROR: UNMET PEER DEPENDENCY react@15.5.4
I fixed this by removing the little ^ symbol in my package.json file in front of the version number ...
react native router flux Actions.[SCENE_NAME] is not working.
with react-native-router-flux: ^3.30.2 if i set type to my scenes Actions dont work And in Drawer if...