-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Don't use BackHandler in web code paths #11316
Comments
Hey @necolas! Thanks for opening the issue. It seems that the issue doesn't contain a link to a repro. The best way to get attention to your issue is to provide an easy way for a developer to reproduce the issue. You can provide a repro using any of the following:
A snack link is preferred since it's the easiest way to both create and share a repro. If it's not possible to create a repro using a snack, link to a GitHub repo under your username is a good alternative. Don't link to a branch or specific file etc. as it won't be detected. Try to keep the repro as small as possible by narrowing down the minimal amount of code needed to reproduce the issue. Don't link to your entire project or a project containing code unrelated to the issue. See "How to create a Minimal, Reproducible Example" for more information. You can edit your original issue to include a link to the repro, or leave it as a comment. The issue will be closed automatically after a while if you don't provide a repro. |
Couldn't find version numbers for the following packages in the issue:
Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3. |
Couldn't find version numbers for the following packages in the issue:
Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3. |
BackHandler got removed on react-native-web here by @necolas He broke the main purpose of the library that is to provide compatibility with react native platform, and now he expects everyone coding for react native (not web) to fix that on external libs. BackHandler is not deprecated on RN https://reactnative.dev/docs/backhandler. This is another library that is not working well with RN web and there will be plenty of them Please rollback, thanks! More info here. |
Hello 👋, this issue has been open for more than a month without a repro or any activity. If the issue is still present in the latest version, please provide a repro or leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution or workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix it. |
Any update on this?
|
@EvanBacon any update on this? I just tried deploying to firebase and I'm getting the same issue |
Is there a 6.x release for this fix planned or only 7.x? I'm wondering because this seems to be blocking my expo-router adoption (in conjunction with react-native-web) |
Hey! This issue is closed and isn't watched by the core team. You are welcome to discuss the issue with others in this thread, but if you think this issue is still valid and needs to be tracked, please open a new issue with a repro. |
Current behavior
BackHandler is imported in web code but is not part of the react-native-web API (0.19) anymore.
Expected behavior
BackHandler should not be used in web code paths. BackHandler can only be imported from
react-native
for native platforms, and file extension forks should be used to preventimport { BackHandler } from 'react-native'
from being present in web code.Reproduction
n/a. No repro because snack doesn't use the latest versions of the react libraries.
Platform
The text was updated successfully, but these errors were encountered: