react-google-recaptcha-v3
react-google-recaptcha-v3 copied to clipboard
Why remove existing recaptcha script on clean? Recaptcha provider performance issue.
Currently the biggest issue with the provider is the performance issue on loading the entire recaptcha on page load.
If I try to move it higher up the tree, the component will refetch the script each time the component is redrawn, and that is because in cleanGoogleRecaptcha
it removes the script from the page, wouldn't it be an improvement to just leave it in?
This way it should have better performance by moving the provider up the tree and it will inject closer to the source, leading to better performance on load.