Skip to content

Update for the wagmi article#17603

Merged
wackerow merged 12 commits into
ethereum:devfrom
qbzzt:260216-wagmi-update
Mar 3, 2026
Merged

Update for the wagmi article#17603
wackerow merged 12 commits into
ethereum:devfrom
qbzzt:260216-wagmi-update

Conversation

@qbzzt
Copy link
Copy Markdown
Contributor

@qbzzt qbzzt commented Feb 20, 2026

Description

Update it from wagmi v1 to wagmi v3

@github-actions github-actions Bot added the content 🖋️ This involves copy additions or edits label Feb 20, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented Feb 20, 2026

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit f932997
🔍 Latest deploy log https://app.netlify.com/projects/ethereumorg/deploys/69a6262c500f3300089afdc5
😎 Deploy Preview https://deploy-preview-17603.ethereum.it
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
7 paths audited
Performance: 58 (🔴 down 2 from production)
Accessibility: 94 (🟢 up 1 from production)
Best Practices: 100 (no change from production)
SEO: 99 (no change from production)
PWA: 59 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Collaborator

@myelinated-wackerow myelinated-wackerow left a comment

Choose a reason for hiding this comment

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

Review: Update wagmi tutorial (v1 → v3)

Good update overall — the v1 APIs are long dead, Sepolia migration makes sense, and replacing RainbowKit with native wagmi hooks is better pedagogically. Prose improvements are solid too.

However, there are some code correctness issues that would break copy-paste for readers.

Blockers

  1. Syntax error in updateStatus — missing parens around parameter:

    // Current (won't compile)
    const updateStatus = newStatus: string => {
    // Should be
    const updateStatus = (newStatus: string) => {
  2. Duplicate ] in ABI block:

    ]  // greeterABI
    ] as const   // greeterABI

    One of these needs to go.

  3. setInterval leak in Timer — calling setInterval directly in the render body (no useEffect, no cleanup) creates a new interval on every re-render. This will stack up exponentially. For a tutorial especially, this teaches a harmful React pattern. Should be:

    useEffect(() => {
      const id = setInterval(() => setNow(new Date()), 1000)
      return () => clearInterval(id)
    }, [])
  4. Broken markdown linkcourtesy of [wagmi]. has no URL. Should be [wagmi](https://wagmi.sh/).

Nice-to-haves / Worth checking

  • Typo: "displayed that information" → "display that information"
  • Typo: "type option language" → "type optional language"
  • == vs === in lastSetterAddress == account.address — strict equality is better practice for a TS tutorial
  • pnpmnpm switch in install instructions — worth verifying the target repo actually uses npm (check for lockfile type)
  • Removed "Adding another blockchain" section — this was arguably the most unique part of the old tutorial. defineChain is even simpler in wagmi v3; consider keeping it updated rather than cutting it entirely
  • Step numbering in the conclusion mixes 1. 1. 2. 3. 4. — minor formatting inconsistency

Reviewed by Claude (claude-opus-4-6)

qbzzt and others added 2 commits February 24, 2026 11:06
…ur-contract/index.md

Co-authored-by: wackerow <54227730+wackerow@users.noreply.github.com>
@myelinated-wackerow
Copy link
Copy Markdown
Collaborator

Follow-up review after latest changes

The four blockers and all nice-to-haves from the previous review have been addressed -- nice work.

A few remaining items:

Will fix in a follow-up commit (1-5)

  1. WagmiConfig / RainbowKitProvider remnants from v1 (lines 109, 112, 127-128) -- The import correctly shows WagmiProvider, but the JSX and closing tags still reference the old v1 names (WagmiConfig, RainbowKitProvider). RainbowKit was removed in this update, so these need to be updated to WagmiProvider and QueryClientProvider.

  2. Typo on line 384: "rather than each time to component is rendered" -- should be "the component"

  3. Duplicate step number on line 747: The "Adding another blockchain" section has two steps numbered 3. (lines 735 and 747). The second should be 4.

  4. Grammar on line 664: "a lot of [L2 scaling solution]" -- should be "L2 scaling solutions" (plural)

  5. Awkward phrasing on line 721: "for users to links to each" -- should be "with links to each"

Question for @qbzzt

  1. defineChain config may use deprecated fields (lines 676-700): The network property and public key under rpcUrls were v1/viem v1 patterns. In viem v2 (paired with wagmi v3), network is deprecated and only default rpcUrls is needed. Can you verify this still works against current viem?

Reviewed by Claude (claude-opus-4-6)

myelinated-wackerow and others added 2 commits February 25, 2026 20:35
- Replace leftover WagmiConfig/RainbowKitProvider with WagmiProvider/QueryClientProvider
- Fix typo: "each time to component" -> "each time the component"
- Fix duplicate step number 3 -> 4 in "Adding another blockchain" section
- Fix grammar: "L2 scaling solution" -> "L2 scaling solutions"
- Fix phrasing: "for users to links to" -> "with links to"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
@qbzzt
Copy link
Copy Markdown
Contributor Author

qbzzt commented Feb 28, 2026

6. defineChain config may use deprecated fields (lines 676-700): The network property and public key under rpcUrls were v1/viem v1 patterns. In viem v2 (paired with wagmi v3), network is deprecated and only default rpcUrls is needed. Can you verify this still works against current viem?

Claude was right. The way I did it works, but this one is better.

Copy link
Copy Markdown
Member

@wackerow wackerow left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks @qbzzt

@wackerow wackerow merged commit 3cb2adb into ethereum:dev Mar 3, 2026
6 of 7 checks passed
@wackerow wackerow mentioned this pull request Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

content 🖋️ This involves copy additions or edits

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants