Skip to content

refactor(react): alias WagmiProviderProps to HydrateProps#5127

Open
slemchik03 wants to merge 2 commits into
wevm:mainfrom
slemchik03:refactor/wagmi-provider-props
Open

refactor(react): alias WagmiProviderProps to HydrateProps#5127
slemchik03 wants to merge 2 commits into
wevm:mainfrom
slemchik03:refactor/wagmi-provider-props

Conversation

@slemchik03

@slemchik03 slemchik03 commented May 18, 2026

Copy link
Copy Markdown

What

  • Alias WagmiProviderProps = HydrateProps in packages/react/src/context.ts.
    The two had identical shapes already and Hydrate is the actual consumer of
    every field, so the previous hand-maintained duplicate just risked drift on
    every future addition.
  • Drop the redundant | undefined on the optional fields of HydrateProps
    (initialState, reconnectOnMount).
  • Minor cleanup: use named PropsWithChildren import, remove the
    unnecessary props = { value: config } local.

Why

Adding a new option to Hydrate previously required editing two structurally
identical types with nothing enforcing that they stay in sync. Aliasing makes
that class of bug impossible.

Test

  • No behavioral change; relying on the existing context.test.tsx for
    coverage.

@changeset-bot

changeset-bot Bot commented May 18, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 669e5f7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
wagmi Patch

Not sure what this means? Click here to learn what changesets are.

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

@vercel

vercel Bot commented May 18, 2026

Copy link
Copy Markdown

@slemchik03 is attempting to deploy a commit to the Wevm Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant