react-google-recaptcha version: 3.1.0
react-async-script version: 1.2.0
Our recaptcha is being mounted inside of a modal, but when the modal is closed (and unmounted) the iframe that was created by react-google-recaptcha does not get cleaned up. This means that if the user opens and closes the modal multiple times, we end up with multiple iframes, as the recaptcha creates a new one each time it is mounted. This is, in essence, a memory leak as these hidden elements just keep adding up and never get cleaned up until a full page refresh.