dozoisch / dozoisch/react-google-recaptcha

What is the right way to use react-google-recaptcha with react-router?

Open
#134 3 comments 14 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.1k
Forks
148
PR merge metrics
No merged PRs in 30d

Description

My application has several routes and only some of them need to use recaptcha.
I added component like this for each view component:
```

```
It seems to work but obviously something is wrong with this approach:
1. Badge disappears after route changing
![image](https://user-images.githubusercontent.com/15232584/55786572-2bb34b00-5abd-11e9-9738-2ad08523247b.png)
2. all recaptcha scripts get reloaded after route changing
3. After each initialization recaptcha elements persist in DOM
![image](https://user-images.githubusercontent.com/15232584/55787160-5b168780-5abe-11e9-9508-d49b1ee68117.png)

Any suggestions will be highly appreciated.

react-google-recaptcha version: 1.0.5

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.