Repository navigation
fix: useSubscription calls onConnectionStateChange - #6797
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThe changes introduce a call to the user-provided Changes
Sequence Diagram(s)sequenceDiagram
participant UserComponent
participant useSubscription
participant Subscription
participant UserCallback
UserComponent->>useSubscription: Provide onConnectionStateChange callback
useSubscription->>Subscription: Setup connection state handler
Subscription-->>useSubscription: Connection state changes
useSubscription->>UserCallback: Call onConnectionStateChange(result)
useSubscription->>useSubscription: Update internal state
Assessment against linked issues
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
⏰ Context from checks skipped due to timeout of 90000ms (4)
🔇 Additional comments (4)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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 (
|
|
@darkobits is attempting to deploy a commit to the trpc Team on Vercel. A member of the Team first needs to authorize it. |
@trpc/client
@trpc/next
@trpc/react-query
@trpc/server
@trpc/tanstack-react-query
@trpc/upgrade
commit: |
|
Aside: This made me smile! 😄
|
|
This pull request has been locked because we are very unlikely to see comments on closed issues. If you think, this PR is still necessary, create a new one with the same branch. Thank you. |
Closes #6693
🎯 Changes
The
useSubscriptionhook registers several event handlers on thesubscriptionit creates. Where relevant, event handlers call the appropriate user-provided callback for a given event. This fix adds that call for theonConnectionStateChangeevent, ensuring that any user-provided callback is invoked as expected.✅ Checklist
Summary by CodeRabbit
Bug Fixes
Tests