Skip to content

chore: update dependencies and improve README for React authentication example#2356

Open
wassimoo wants to merge 5 commits into
masterfrom
wassimoo/upgrade-protect-page-login-react
Open

chore: update dependencies and improve README for React authentication example#2356
wassimoo wants to merge 5 commits into
masterfrom
wassimoo/upgrade-protect-page-login-react

Conversation

@wassimoo
Copy link
Copy Markdown
Contributor

@wassimoo wassimoo commented Nov 20, 2025

  • Updated @ory/client-fetch, react, and react-dom to their latest versions.
  • Added a note about using the Ory Tunnel with the --dev flag for easier integration.

Related Issue or Design Document

Checklist

  • I have read the contributing guidelines and signed the CLA.
  • I have referenced an issue containing the design document if my change introduces a new feature.
  • I have read the security policy.
  • I confirm that this pull request does not address a security vulnerability.
    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.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added the necessary documentation within the code base (if appropriate).

Further comments

Summary by CodeRabbit

  • Documentation

    • Rewrote getting started guide with clearer prerequisites and local development instructions
    • Clarified SDK configuration setup
    • Added production hosting configuration reference table
    • Updated project file name references
  • Chores

    • Updated project dependencies

Review Change Stack

Copy link
Copy Markdown
Member

@vinckr vinckr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

a few small formatting etc nits to resolve then can be merged imo

Comment thread code-examples/protect-page-login/react/README.md Outdated
Comment thread code-examples/protect-page-login/react/README.md Outdated
Comment thread code-examples/protect-page-login/react/README.md Outdated
Comment thread code-examples/protect-page-login/react/README.md Outdated
Comment thread code-examples/protect-page-login/react/README.md Outdated
Comment thread code-examples/protect-page-login/react/README.md Outdated
Comment thread code-examples/protect-page-login/react/README.md Outdated
Comment thread docs/getting-started/integrate-auth/35_react-native.mdx Outdated
Comment thread docs/getting-started/integrate-auth/25_react.mdx Outdated
@vinckr vinckr requested a review from unatasha8 as a code owner March 13, 2026 09:04
@vinckr vinckr force-pushed the wassimoo/upgrade-protect-page-login-react branch from bbb6f4b to f46f92f Compare March 13, 2026 09:04
@vinckr vinckr enabled auto-merge (squash) March 13, 2026 09:04
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 13, 2026

📝 Walkthrough

Walkthrough

This 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.

Changes

React Protect-Page-Login Example Update

Layer / File(s) Summary
Documentation restructuring and dependency updates
code-examples/protect-page-login/react/README.md, code-examples/protect-page-login/react/package.json, code-examples/protect-page-login/react/src/api/package.json
README rewritten with prerequisites, numbered get-started walkthrough, updated Ory Tunnel instructions, clarified SDK basePath setup, restructured API server guidance, updated project file names (AppWithApi.tsx), and added production hosting domain mapping table. @ory/client-fetch bumped from ^1.19.0 to ^1.22.11 and from ^1.20.6 to ^1.22.11 across root and API package manifests; react and react-dom bumped from ^19.0.0 to ^19.2.0.

🎯 2 (Simple) | ⏱️ ~10 minutes

🐰 A README blooms with step-by-step care,
Dependencies refreshed with the latest flair,
React and Ory now aligned and bright,
The example shines with clearer light! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes: dependency updates and README improvements for the React authentication example, matching the changeset content.
Description check ✅ Passed The description provides a summary of changes (dependencies and README notes) but lacks issue/design document reference and leaves all checklist items unchecked despite being maintenance work.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch wassimoo/upgrade-protect-page-login-react

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between dc41be4 and bbb4584.

⛔ Files ignored due to path filters (4)
  • code-examples/protect-page-login/react/package-lock.json is excluded by !**/package-lock.json
  • code-examples/protect-page-login/react/src/api/package-lock.json is excluded by !**/package-lock.json
  • docs/getting-started/integrate-auth/25_react.mdx is excluded by !**/*.mdx
  • docs/getting-started/integrate-auth/35_react-native.mdx is excluded by !**/*.mdx
📒 Files selected for processing (3)
  • code-examples/protect-page-login/react/README.md
  • code-examples/protect-page-login/react/package.json
  • code-examples/protect-page-login/react/src/api/package.json

Comment on lines +15 to +16
"react": "^19.2.0",
"react-dom": "^19.2.0"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 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:


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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants