Update for the wagmi article#17603
Conversation
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
myelinated-wackerow
left a comment
There was a problem hiding this comment.
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
-
Syntax error in
updateStatus— missing parens around parameter:// Current (won't compile) const updateStatus = newStatus: string => { // Should be const updateStatus = (newStatus: string) => {
-
Duplicate
]in ABI block:] // greeterABI ] as const // greeterABI
One of these needs to go.
-
setIntervalleak inTimer— callingsetIntervaldirectly in the render body (nouseEffect, 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) }, [])
-
Broken markdown link —
courtesy 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===inlastSetterAddress == account.address— strict equality is better practice for a TS tutorialpnpm→npmswitch 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.
defineChainis 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)
…ur-contract/index.md Co-authored-by: wackerow <54227730+wackerow@users.noreply.github.com>
Follow-up review after latest changesThe 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)
Question for @qbzzt
Reviewed by Claude (claude-opus-4-6) |
- 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>
Claude was right. The way I did it works, but this one is better. |

Description
Update it from wagmi v1 to wagmi v3