postpartum-wellness-app icon indicating copy to clipboard operation
postpartum-wellness-app copied to clipboard

Replace usage of EventEmitter's deprecated methods

Open dmahajan980 opened this issue 2 years ago • 4 comments

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:

  1. Start the application server in dev mode using the command: yarn start
  2. Run the app on a simulator or device.
  3. Once the app loads, go to "Home" tab.
  4. Press "Sign-up" button to go to the sign-up page.
  5. 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

Screenshot 2022-10-01 at 4 35 59 PM Screenshot 2022-10-01 at 4 27 14 PM Screenshot 2022-10-01 at 4 29 31 PM Screenshot 2022-10-01 at 4 29 43 PM

Smartphone (please complete the following information):

  • Device: iPhone 13 Pro Max
  • OS: iOS 15.5
  • Version: 1.0.0

dmahajan980 avatar Oct 01 '22 11:10 dmahajan980

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 avatar Oct 01 '22 12:10 dmahajan980

@dmahajan980 got for it! If you have questions, or an update, let me know.

BekahHW avatar Oct 03 '22 18:10 BekahHW

@dmahajan980 how are things going with this?

BekahHW avatar Oct 27 '22 16:10 BekahHW

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 :)

dmahajan980 avatar Oct 27 '22 22:10 dmahajan980