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

Feat: Add support for React Native 0.77 #2728

Closed
wants to merge 1 commit into from

Conversation

quocluongha
Copy link

React Native 0.77 has remove BackHandler.removeEventListener in #44d6194, and it causes app to crash when upgrading to version 0.77.

I updated the code with useRef to store subscription returned by BackHandler.addEventListener and replace BackHandler.removeEventListener with the remove method of the subscription.

As stated in this old commit #2596b2f. There should be remove method in the returned subscription in previous React Native version, so it won't affect old React Native version.

image

@Kirill5k
Copy link

Any ideas when this will be merged and released? I am facing the same issue after updating to RN 0.77

@ahsansher
Copy link

Do we have any update on this, eta on release?

@luizpcam
Copy link

luizpcam commented Feb 5, 2025

me too ... same issue here ..

@mhaf4krr
Copy link

mhaf4krr commented Feb 5, 2025

Any update on this?

@akash3gtm
Copy link
Collaborator

akash3gtm commented Feb 5, 2025

We will test it and then see how to proceed from this, we might need to change some other libraries and also check the support from react-native-web.
For the time being, if its a tight schedule, you can manually create a patch for @react-native-aria/interactions and run it locally.

@akash3gtm akash3gtm added bug Something isn't working enhancement New feature or request react-native-aria labels Feb 5, 2025
@kamlesh-tp
Copy link

Facing the same issue should be merged soon.

@akash3gtm
Copy link
Collaborator

This will take some time even though the proposed changes are correct.

  • our whole dev mode is made on react native older versions
  • if we merge this right now, even though the user's will not face any issue, the dev mode of our repository will break
  • this will be merged when the complete development mode is upgraded to react native 0.77

@HamidShaikh1499
Copy link

Lot's of components are not working due to this such error: Dialog, Modal, Alert Dialog, Toast, BottomSheet, ActionSheet and Select.

Oh please merge this....!

@luizpcam
Copy link

Lot's of components are not working due to this such error: Dialog, Modal, Alert Dialog, Toast, BottomSheet, ActionSheet and Select.

Oh please merge this....!

Yeah. Same here

@kamlesh-tp
Copy link

Can we somehow make it conditional? Like if removeListener is available then use that otherwise use the new way?

@quocluongha
Copy link
Author

@kamlesh-tp I think it is unnescessary to make it conditional.
If you look at this commit #44d6194, they removed BackHandler.removeEventListener because there has already a remove method in the subsciption returned by BackHandler.addEventListener in this commit #2596b2f for almost 3 years.

@akash3gtm
Copy link
Collaborator

This is being worked in PR 2744

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request react-native-aria
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants