marsidev / react-turnstile

Cloudflare Turnstile integration for React.
https://www.npmjs.com/package/@marsidev/react-turnstile
MIT License
414 stars 25 forks source link

React: Invalid hook call #37

Closed kfaria closed 1 year ago

kfaria commented 1 year ago

Do you want to request a feature or report a bug? Bug

What is the current behavior? When adding the Turnstyle component to my component, I am receiving an "invalid hook call". I'm rendering the component as follows:

<Turnstile siteKey='1x00000000000000000000AA' />

What is the expected behavior? The turnstile widget should render.

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React? React 18.2 This is a new implementation of this component so not sure if this has worked for us in the past.

marsidev commented 1 year ago

Hey! Thanks for sharing. I don't see that happening on this demo. Can you please replicate the bug in a codesandbox?

Btw, which version do you have installed?

marsidev commented 1 year ago

Closing this due to inactivity. Feel free to re-open with more details, if needed.