marsidev / react-turnstile

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

πŸš€ Feature: React 19 support #93

Closed mayocream closed 1 week ago

mayocream commented 3 weeks ago

Bug Report Checklist

Overview

Support React 19, as well as Next.js 15 supported it.

Additional Info

No response

joepetrillo commented 1 week ago

@marsidev Any updates on this? Thanks!

t6tv8e commented 1 week ago

Not functional on Next.js 15?

mayocream commented 1 week ago

Hi @marsidev, it functions on Next.js 15, but there's a warning that the peer dependency doesn't support React 19 RC.

❯ pnpm update --latest                                                                  (base) 
Packages: +2
++
Progress: resolved 589, reused 563, downloaded 2, added 2, done
 WARN  Issues with peer dependencies found
.
β”œβ”€β”¬ @marsidev/react-turnstile 1.0.2
β”‚ β”œβ”€β”€ βœ• unmet peer react@"^17.0.2 || ^18.0.0": found 19.0.0-rc-66855b96-20241106
β”‚ └── βœ• unmet peer react-dom@"^17.0.2 || ^18.0.0": found 19.0.0-rc-66855b96-20241106

I think changing these two lines would support the React 19.

https://github.com/marsidev/react-turnstile/blob/a49426e3484714b898fad4bb642e8fc5e4b8a63d/packages/lib/package.json#L40-L41