Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Dec 3, 2025

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

[email protected]

Minor Changes

  • Deprecated custom mutate function names and renamed to mutate/mutateAsync to reduce destructure key renaming fatigue and align with TanStack Query terminology. (#4878)

    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

@wagmi/[email protected]

Patch Changes

  • Deprecated custom mutate function names and renamed to mutate/mutateAsync to reduce destructure key renaming fatigue and align with TanStack Query terminology. (#4878)

    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

@vercel
Copy link

vercel bot commented Dec 3, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
wagmi Ready Ready Preview Comment Dec 3, 2025 5:40pm

@tmm tmm merged commit 763d370 into main Dec 3, 2025
8 checks passed
@tmm tmm deleted the changeset-release/main branch December 3, 2025 18:15
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