Skip to content

Conversation

@tmm
Copy link
Member

@tmm tmm commented Nov 18, 2025

Renames mutate functions to mutate/mutateAsync to reduce destructure key renaming fatigue and align with TanStack Query terminology.

Before

Had to destructure hook result and often rename keys when using multiple of the same hook. Could decide not to destructure, but syntax becomes awkward for mutate functions (e.g. connect.connect or connect.connectAsync).

const { connect, isPending: connectIsPending } = useConnect()
const { writeContract: transfer, error: transferError, isPending: transferIsPending } = useWriteContract()
const { writeContract: approve, error: approveError } = useWriteContract()

After

Allows you to name the hook result whatever you want and not worry about also renaming properties.

const connect = useConnect() // connect.isPending
const transfer = useWriteContract() // transfer.mutate, transfer.error, transfer.isPending
const approve = useWriteContract() // approve.mutate, approve.error

@changeset-bot
Copy link

changeset-bot bot commented Nov 18, 2025

⚠️ No Changeset found

Latest commit: bde1c37

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codecov
Copy link

codecov bot commented Nov 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.44%. Comparing base (3dcce69) to head (bde1c37).

Additional details and impacted files
@@                         Coverage Diff                          @@
##           tmm/move-connectors-to-peer-deps    #4878      +/-   ##
====================================================================
- Coverage                             87.45%   87.44%   -0.02%     
====================================================================
  Files                                   259      259              
  Lines                                  2463     2461       -2     
  Branches                                766      766              
====================================================================
- Hits                                   2154     2152       -2     
  Misses                                  134      134              
  Partials                                175      175              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Base automatically changed from tmm/move-connectors-to-peer-deps to main November 19, 2025 19:13
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.

2 participants