wagmi icon indicating copy to clipboard operation
wagmi copied to clipboard

fix: allow excessive hydration to fix hanging `isReconnecting` state

Open dalechyn opened this issue 1 year ago • 4 comments

As far as I've understood, the const active = useRef(true) was there to really make sure the effect is run just once as React doesn't guarantee that an effect won't be re-run once again, and for the same reason the dependencies were empty to minimize the redundant effect calls.

However, I think the effect still has to be run as during hot-reload component might get remounted with all connectors hanging in isReconnecting: true state.

Using this as a workaround for now.

Might fix #3490, yet also prune to excessive re-connects that might cause UI regressions, idk.

Description

What changes are made in this PR? Is it a feature or a bug fix?

Additional Information

Before submitting this issue, please make sure you do the following.

  • [ ] Read the contributing guide
  • [ ] Added documentation related to the changes made.
  • [ ] Added or updated tests (and snapshots) related to the changes made.

dalechyn avatar Jan 21 '24 13:01 dalechyn

⚠️ No Changeset found

Latest commit: 418703aed482e12c88377cd82097e56ded24b257

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

changeset-bot[bot] avatar Jan 21 '24 13:01 changeset-bot[bot]

@dalechyn is attempting to deploy a commit to the wagmi Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Jan 21 '24 13:01 vercel[bot]

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 Jan 21, 2024 1:25pm

vercel[bot] avatar Jan 21 '24 13:01 vercel[bot]

Closing in favor of #3715

jxom avatar Mar 18 '24 00:03 jxom