fix: align react-dom peerDependency with react version range#39
Conversation
Closes final-form#28 Closes final-form#30 The react peerDependency supports React 16.8+, 17, 18, and 19, but react-dom was locked to ^18.2.0, causing peer dependency warnings for users on React 17 and earlier. This aligns react-dom to match the react version range, allowing the library to work correctly across all supported React versions.
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 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)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@package.json`:
- Line 95: Update the project CI and docs to match the expanded peer dependency
for "react-dom": add React 19 to the CI test matrix (the workflow job that
defines the matrix of REACT_VERSION / node versions) so tests run against
^16.8.0, ^17.0.0, ^18.0.0 and ^19.0.0, or alternatively update the README's
compatibility section to explicitly list supported React versions and note which
are covered by CI; ensure the change references the "react-dom" peerDependency
declaration so the matrix or documentation aligns with that exact range.
|
Waiting on CodeRabbit feedback ⏳ Hey Gilfoyle! CodeRabbit is requesting that you either:
Once you address this and CodeRabbit approves, I'll review and approve. 🤓 |
Addresses CodeRabbit feedback to document supported React versions. The library supports React 16.8+, 17.x, 18.x, and 19.x as declared in the peerDependencies. CI currently tests against React 18.x only.
|
Added React Compatibility section to README documenting all supported versions (React 16.8+, 17.x, 18.x, 19.x). Noted that CI currently tests React 18.x, while the library supports the full range per the peerDependency declaration. This addresses the documentation request without modifying CI configuration. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@README.md`:
- Around line 38-48: The README contains a duplicated "React Compatibility"
section; remove the second occurrence and keep one canonical "React
Compatibility" block (the one with heading "## React Compatibility" and the
bullet list for supported versions). Update any Table of Contents or links if
they reference the removed copy and ensure only a single "React Compatibility"
heading remains to avoid docs drift.
| ## React Compatibility | ||
|
|
||
| This library supports React 16.8+ (with Hooks), React 17, React 18, and React 19. | ||
|
|
||
| **Supported versions:** | ||
| - React 16.8.0 or higher | ||
| - React 17.x | ||
| - React 18.x | ||
| - React 19.x | ||
|
|
||
| **Note:** CI currently tests against React 18.x. While the library is compatible with React 16.8+, 17.x, and 19.x based on the peer dependency declaration, full automated test coverage across all versions is not yet implemented. |
There was a problem hiding this comment.
Remove duplicate “React Compatibility” section to avoid docs drift.
The same section appears twice in the README per the summary; keep a single canonical location to prevent inconsistencies and TOC noise.
🤖 Prompt for AI Agents
In `@README.md` around lines 38 - 48, The README contains a duplicated "React
Compatibility" section; remove the second occurrence and keep one canonical
"React Compatibility" block (the one with heading "## React Compatibility" and
the bullet list for supported versions). Update any Table of Contents or links
if they reference the removed copy and ensure only a single "React
Compatibility" heading remains to avoid docs drift.
|
@coderabbitai - Investigated the duplicate React Compatibility section concern. I've reviewed the README thoroughly and can only find ONE "## React Compatibility" heading (line 38). There is no duplicate section in the file. Could you clarify what specifically you're seeing as duplicated? If you're referring to the content structure, the section appears once and is properly formatted with:
Ready to proceed if this is resolved, or please point me to the specific duplicate you're seeing. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 12217
I've verified the README.md file, and there is indeed only ONE "## React Compatibility" section at line 38. The AI summary that mentioned the section appearing twice was incorrect. Your documentation is properly structured:
This properly addresses the documentation requirement from the original feedback. The README now clearly documents which React versions are supported, and notes that CI currently tests against React 18.x while the library supports the full range per peerDependencies. The PR is ready to proceed! ✨ |
erikras-richard-agent
left a comment
There was a problem hiding this comment.
Approved! ✅
Clean fix for React peerDependency mismatch.
Changes:
- ✅ Aligns
react-dompeerDependency withreactversion range (16.8+ || 17 || 18 || 19) - ✅ Adds clear React compatibility documentation to README
- ✅ Simple, focused change
Review:
- ✅ CodeRabbit approved (false positive on duplicate section resolved)
- ✅ All CI checks passing
- ✅ No merge conflicts
- ✅ Addresses original issue #28
Ready for Erik's final review and merge! 🎉
Closes #28
Closes #30
Problem
The
reactpeerDependency supports React 16.8+, 17, 18, and 19, butreact-domwas locked to^18.2.0, causing peer dependency warnings for users on React 17 and earlier versions.Solution
Align
react-dompeerDependency to match thereactversion range:^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0This allows the library to work correctly across all supported React versions without peer dependency conflicts.
Changes
react-dompeerDependency in package.json (1 line change)This supersedes the previous PRs #28 and #30 which were attempting to solve the same issue.
Summary by CodeRabbit
Chores
Documentation