postpartum-wellness-app
postpartum-wellness-app copied to clipboard
Replace usage of EventEmitter's deprecated methods
Describe the bug
Running the application in dev mode, the "Sign-up" screen shows warnings related to usage of removeListener
method from EventEmitter
(see Screenshots below). This occurs because the removeListener
method has been deprecated.
To Reproduce Steps to reproduce the behavior:
- Start the application server in dev mode using the command:
yarn start
- Run the app on a simulator or device.
- Once the app loads, go to "Home" tab.
- Press "Sign-up" button to go to the sign-up page.
- The warnings will show up at the bottom of the screen. Click on them to expand.
Expected behavior Ideally, there shouldn't be any warnings/errors.
Screenshots




Smartphone (please complete the following information):
- Device: iPhone 13 Pro Max
- OS: iOS 15.5
- Version: 1.0.0
On further inspection, the source of this warning is @react-navigation
(see ticket). In our case, the specific package is @react-navigation/bottom-tabs
.
As this app is using a slightly outdated version of the React Navigation packages(v5), I guess these could be resolved by upgrading React Navigation to v6. I can try the migration to check if that resolves these warnings.
@dmahajan980 got for it! If you have questions, or an update, let me know.
@dmahajan980 how are things going with this?
Hi @BekahHW, unfortunately, I haven't been able to spend much time on this because of an ongoing project in my company. It would be great if someone else can pick this up as I'm not sure if I can work on this anytime soon. Otherwise, happy to fix this myself in the future once things settle down :)