-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ReCaptcha V2 is not rendered if provider and comsumer is not rendered at the same time #27
Labels
bug
Something isn't working
Comments
thank you @denesstreambright for the report, I'll try to fix it quickly. |
antokara
added a commit
that referenced
this issue
May 8, 2020
* modify index of dev and examples, to test and demo delayed render of v2 widget * fix comment in v2 component IState * rename checkComponentDidUpdate method of v2 component, to shouldRenderWidget and change comparison logic to check if previously rendered instead of change in providerContext.loaded * add componentDidMount lifecycle event method in v2 component to invoke shouldRenderWidget * refactor v2 component tests to smaller files * add v2 component tests for test with initial providerContext.loaded:true fix #27
antokara
added a commit
that referenced
this issue
May 8, 2020
* modify index of dev and examples, to test and demo delayed render of v2 widget * fix comment in v2 component IState * rename checkComponentDidUpdate method of v2 component, to shouldRenderWidget and change comparison logic to check if previously rendered instead of change in providerContext.loaded * add componentDidMount lifecycle event method in v2 component to invoke shouldRenderWidget * refactor v2 component tests to smaller files * add v2 component tests for test with initial providerContext.loaded:true fix #27
@denesstreambright I just released v1.1.4 with the fix please let me know if the issue persists. |
Thanks for the quick fix, it works now! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
If you use the widget like the example show, it works correctly, but if you want to use it in a more complex app, which uses somekind of router, put the provider around the router and later navigate to a route which renders the recaptcha, is not rendered.
To Reproduce
-Run create react app
-replace the content of app.js with the following:
Expected behavior
the recaptcha whould render
Actual
If you set delay to ~50 it works, if tou set it to ~500 it does not. I guess it depends on when the google recaptcha script (added by this lib) loads
Desktop
The text was updated successfully, but these errors were encountered: