-
-
Notifications
You must be signed in to change notification settings - Fork 607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@trigger.dev/react-hooks now works with React 19 #1559
Conversation
🦋 Changeset detectedLatest commit: d99d6a1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 12 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughThe pull request introduces updates to the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@trigger.dev/react-hooks
@trigger.dev/rsc
trigger.dev
@trigger.dev/build
@trigger.dev/sdk
@trigger.dev/core
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
packages/react-hooks/package.json (1)
Line range hint
1-77
: Package structure follows best practicesThe package configuration is well structured with:
- Proper dual package hazard handling via exports field
- Clear type definitions for both ESM and CommonJS
- Appropriate engine requirements
Consider adding
"sideEffects": false
to enable better tree-shaking in webpack and other bundlers, if this package is indeed side-effect free.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (2)
.changeset/fuzzy-coins-cross.md
(1 hunks)packages/react-hooks/package.json
(2 hunks)
✅ Files skipped from review due to trivial changes (1)
- .changeset/fuzzy-coins-cross.md
🔇 Additional comments (1)
packages/react-hooks/package.json (1)
54-55
: LGTM! Peer dependencies correctly updated for React 19
The peer dependency version range ^18.0 || ^19.0 || ^19.0.0-rc
is appropriate as it:
- Maintains compatibility with React 18
- Adds support for stable React 19
- Explicitly supports RC versions of React 19
Let's verify this matches React's recommended peer dependency pattern:
✅ Verification successful
Peer dependency pattern for React 19 is correctly implemented
The verification confirms that:
- The peer dependency pattern
^18.0 || ^19.0 || ^19.0.0-rc
is unique to the react-hooks package - It follows a standard semver range format with the caret operator
- The explicit inclusion of RC versions is appropriate for early React 19 support
- The same pattern is consistently applied to both react and react-dom dependencies
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check other popular React packages for their peer dependency patterns
# This helps verify we're following community standards
# Search for react peer dependencies in the repository
rg -U "peerDependencies[^\}]+react[^\}]+" --type json
# Check some popular React packages from node_modules
fd -t f "package.json" -x sh -c 'echo "=== $1 ==="; cat "$1" | jq -r ".peerDependencies?.react // empty"' sh {} \;
Length of output: 2080
For full compat we will need to update
swr
to 2.2.6 when it's released: vercel/swr#3051Summary by CodeRabbit
New Features
@trigger.dev/react-hooks
package for compatibility with React 19.Bug Fixes
react
andreact-dom
to ensure compatibility with newer versions.