covidwatchorg / portal

Covid Watch Portal web app for diagnosis verification
Apache License 2.0
8 stars 3 forks source link

PendingOperationButton memory leak fix #501

Closed ibeckermayer closed 4 years ago

ibeckermayer commented 4 years ago

closes https://github.com/covidwatchorg/portal/issues/295

Inspired by https://dev.to/otamnitram/react-useeffect-cleanup-how-and-when-to-use-it-2hbm

To check: Previously reset-password.test.js and code_validations.test.js were throwing

Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function.

but that should no longer be the case

ibeckermayer commented 4 years ago

This breaks login for me, so I think there's still a bug somewhere Screen Capture_Navigator_20200814152848

Lol, yeah this isn't good... Broken for me too -- converting to draft and will dig in further.