Skip to content

Conversation

@o-az
Copy link
Contributor

@o-az o-az commented May 26, 2025

useConnect():

  • deprecate .connect and .connectAsync,
  • add .mutate and .mutateAsync,
  • updates tests to use mutate,
  • update connect to mutate in docs for Vue and React

useDisconnect():

  • deprecate .disconnect and .disconnectAsync,
  • add .mutate and .mutateAsync,
  • updates tests to use mutate,
    • update disconnect to mutate in docs for Vue and React

@changeset-bot
Copy link

changeset-bot bot commented May 26, 2025

⚠️ No Changeset found

Latest commit: ded2ee4

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

@vercel
Copy link

vercel bot commented May 26, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
wagmi ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 8, 2025 6:09am

Copy link
Member

@tmm tmm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Ideally we could extend this in the following ways:

  • Remove 'mutate' | 'mutateAsync' from being omitted from the query return type (React, Vue)
  • Add @deprecated comments to the XMutate and XMutateAsync type helpers (e.g. ConnectMutate and ConnectMutateAsync)
  • Add mutate/mutateAsync for all mutation hooks (along with the above and @deprecated comments for named return methods)

You are welcome to work on this or I can merge you PR into another branch and do this when I get some time.

@o-az o-az force-pushed the o-az/connect-to-mutate branch from 05e353c to ded2ee4 Compare June 8, 2025 06:04
@tmm tmm marked this pull request as draft June 29, 2025 19:03
@tmm tmm marked this pull request as ready for review June 29, 2025 19:18
@tmm tmm marked this pull request as draft June 29, 2025 19:18
@tmm tmm force-pushed the main branch 4 times, most recently from dbb8093 to 5937456 Compare September 19, 2025 17:26
@jxom jxom force-pushed the main branch 2 times, most recently from 27f0d04 to 7d15f06 Compare September 24, 2025 22:39
@jxom jxom mentioned this pull request Oct 8, 2025
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