react-google-recaptcha-v3 icon indicating copy to clipboard operation
react-google-recaptcha-v3 copied to clipboard

Why remove existing recaptcha script on clean? Recaptcha provider performance issue.

Open TeoChi-CF opened this issue 9 months ago • 0 comments

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.

TeoChi-CF avatar Nov 20 '23 13:11 TeoChi-CF