chore: update dependencies and improve README for React authentication example#2356
chore: update dependencies and improve README for React authentication example#2356wassimoo wants to merge 5 commits into
Conversation
vinckr
left a comment
There was a problem hiding this comment.
Nice, thanks!
a few small formatting etc nits to resolve then can be merged imo
Co-authored-by: Vincent <vinckr@posteo.net>
bbb6f4b to
f46f92f
Compare
📝 WalkthroughWalkthroughThis PR updates the React protect-page-login code example with a restructured README that presents a step-by-step setup flow, clarified API instructions, and a production hosting reference table. Dependency versions for Ory client and React packages are bumped to latest compatible releases. ChangesReact Protect-Page-Login Example Update
🎯 2 (Simple) | ⏱️ ~10 minutes
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@code-examples/protect-page-login/react/package.json`:
- Around line 15-16: package.json currently pins eslint-plugin-react-hooks to
^5.1.0 which is incompatible with React 19.2; update the dependency
"eslint-plugin-react-hooks" to version 6.x or later in package.json, run
npm/yarn install to update lockfile, and ensure any ESLint config
(extends/plugins) continues to reference "react-hooks" so new hook semantics
(e.g., Effect Events) are linted correctly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: cfa77b26-e1d9-4ff7-abb8-5e5bec1be44c
⛔ Files ignored due to path filters (4)
code-examples/protect-page-login/react/package-lock.jsonis excluded by!**/package-lock.jsoncode-examples/protect-page-login/react/src/api/package-lock.jsonis excluded by!**/package-lock.jsondocs/getting-started/integrate-auth/25_react.mdxis excluded by!**/*.mdxdocs/getting-started/integrate-auth/35_react-native.mdxis excluded by!**/*.mdx
📒 Files selected for processing (3)
code-examples/protect-page-login/react/README.mdcode-examples/protect-page-login/react/package.jsoncode-examples/protect-page-login/react/src/api/package.json
| "react": "^19.2.0", | ||
| "react-dom": "^19.2.0" |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
For React 19.2 projects, what minimum eslint-plugin-react-hooks version is required by official React documentation/changelog?
💡 Result:
The official React 19.2 blog post recommends upgrading to eslint-plugin-react-hooks@latest (which was v6 at the time of release on 2025-10-01) for proper support of new features like Effect Events, as older versions may incorrectly suggest adding them to dependency arrays [1]. It explicitly announces eslint-plugin-react-hooks v6 with flat config support by default in the recommended preset and opt-in for React Compiler rules [1]. The plugin's changelog confirms v6.1.0 (first official 6.x release) as a major version with breaking changes like requiring Node.js 18+ and flat config as default [2]. No strict minimum version like a peer dependency is enforced in React's package.json or docs; React 19 projects work with v5.x but require v6+ for full 19.2 feature linting [1][2]. As of 2026-05-13, latest is v7.1.1 [3].
Citations:
- 1: https://react.dev/blog/2025/10/01/react-19-2
- 2: https://github.com/facebook/react/blob/main/packages/eslint-plugin-react-hooks/CHANGELOG.md
- 3: https://www.npmjs.com/package/eslint-plugin-react-hooks
Update eslint-plugin-react-hooks to v6+ alongside React 19.2 upgrade.
React 19.2 requires eslint-plugin-react-hooks v6 or higher to properly lint new hook semantics and features (e.g., Effect Events). The project currently pins eslint-plugin-react-hooks@^5.1.0, which will not provide full linting coverage for React 19.2 features. Bump the plugin to v6+ in this PR.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@code-examples/protect-page-login/react/package.json` around lines 15 - 16,
package.json currently pins eslint-plugin-react-hooks to ^5.1.0 which is
incompatible with React 19.2; update the dependency "eslint-plugin-react-hooks"
to version 6.x or later in package.json, run npm/yarn install to update
lockfile, and ensure any ESLint config (extends/plugins) continues to reference
"react-hooks" so new hook semantics (e.g., Effect Events) are linted correctly.
Related Issue or Design Document
Checklist
If this pull request addresses a security vulnerability,
I confirm that I got approval (please contact security@ory.com) from the maintainers to push the changes.
Further comments
Summary by CodeRabbit
Documentation
Chores