question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hardware/software back button press ignored by ScreenStack and onDismiss

See original GitHub issue

I’m trying to make some simple navigation components, but when I tried making a stack, it ignores the back press and shuts down the app instead of poping the screen.

<ScreenStack
                style={{
                    flex: 1
                }}
            >
                <Screen
                    style={StyleSheet.absoluteFill}
                    onDismissed={() => {console.log("------------ dismissed")}}
                >
                    <Screen1/>
                </Screen>
                <Screen
                    style={StyleSheet.absoluteFill}
                    onDismissed={() => {console.log("------------ dismissed")}}
                >
                    <Screen2/>
                </Screen>
            </ScreenStack>

Also the parameter is different for the example and documentation (docs say onDismiss, example has onDismissed. tried both and neither work)

I’d like to know if this is a bug or if I’m doing something wrong.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
MarcusMortercommented, May 22, 2020

@WoLewicki yup, it works now

1reaction
MarcusMortercommented, Apr 1, 2020

@WoLewicki I’ll try (just don’t have a pc now, gonna be durring the weekend)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Preventing hardware back button android for React Native
I disable my back button (android) for whole application by add this code in ... Disable back button for module react-navigation, use hook...
Read more >
Kivy Latest | PDF | Mac Os X Snow Leopard | Shader - Scribd
Then, you can execute application by doing a right click on the .py le ... We extend the build() function to be able...
Read more >
Hardware Back Button for Capacitor & Cordova on Android ...
By default in Ionic, when the back button is pressed, the current view will be popped off the navigation stack, and the previous...
Read more >
Preventing going back - React Navigation
The user pressed back button on a screen in a stack. The user performed a swipe back gesture. Some action such as pop...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found