facebook / react-native-website

The React Native website and docs
https://reactnative.dev
MIT License
1.91k stars 4.34k forks source link

Replace RCTEventEmitter with RCTModernEventEmitter in Android Native UI Components guide #4113

Closed IgorKhramtsov closed 1 month ago

IgorKhramtsov commented 1 month ago

I was following this guide and noticed that RCTEventEmitter is marked as deprecated in the latest (0.74) ReactNative release. Looks like there is a RCTModernEventEmitter that should be used instead.

This [RCTModernEventEmitter] is a transitional replacement for RCTEventEmitter that works with Fabric and non-Fabric renderers. RCTEventEmitter works with Fabric as well, but there are negative perf implications and it should be avoided.

facebook-github-bot commented 1 month ago

Hi @IgorKhramtsov!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

netlify[bot] commented 1 month ago

Deploy Preview for react-native ready!

Name Link
Latest commit e779e7cd4dcfee98a41f8819f7b76d285266885a
Latest deploy log https://app.netlify.com/sites/react-native/deploys/6640c368678e1e00087c721b
Deploy Preview https://deploy-preview-4113--react-native.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

facebook-github-bot commented 1 month ago

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

IgorKhramtsov commented 1 month ago

Actually, the methods are different in RCTModernEventEmitter which also should be reflected in the docs and since it's not clear how to use new one I'm closing this PR.