Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BackHandler is not supported on web and should not be used #751

Open
alielhusseini opened this issue Sep 16, 2023 · 2 comments
Open

BackHandler is not supported on web and should not be used #751

alielhusseini opened this issue Sep 16, 2023 · 2 comments
Labels

Comments

@alielhusseini
Copy link

Environment

Platforms

Versions

expo 49

  • Android:
  • iOS:
  • react-native-modal:
  • react-native:
  • react:

Description

react-native-modal uses the BackHandler yet react-native-web has dropped it, thus on the web there's this issue: "BackHandler is not supported on web and should not be used"

Reproducible Demo

@MiguelNiblock
Copy link

also getting this problem whenever I close the modal and passed props for onDismiss and onModalHide

@km-tr
Copy link

km-tr commented Mar 6, 2024

As long as the following specifications exist, I think they will be displayed. In the case of the web, I want to delete it.

BackHandler.addEventListener('hardwareBackPress', this.onBackButtonPress);

https://github.com/necolas/react-native-web/blob/5f9c32eba0f840bde7b462a57d0748358ff866f6/packages/react-native-web/src/exports/BackHandler/index.js#L13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants