Open biot023 opened 8 months ago
Have the same problem. @biot023 Did you managed it?
I worked around this by letting the Turnstile
component only render on the client via ClientOnly
from https://sergiodxa.github.io/remix-utils/#md:clientonly
You need to render only on the client. With ClientOnly
as emqMalte said, or with useEffect
:
export default function ComponentWithTurnstile() {
const [isClient, setIsClient] = useState(false);
useEffect(() => {
setIsClient(true);
}, []);
return (
...
{isClient && <Turnstile ... />}
)
}
Hello -- I'm trying to use the
Turnstile
component in a Remix app, like so:However, when I try to browse to this route, I get this error:
Line 19, that it mentions in the error, is where the
Turnstile
component is declared.Is this something anyone else has come across? And can they offer any advice, if they have? Thank you, Doug.