Skip to content

State Management & UX (Wagmi + TanStack Query) #5

Description

@samarkun23

We are currently managing signer and ethers contracts manually in page.tsx. This can lead to race conditions and "sticky" state when switching accounts or networks.

  • Improvement: Migrate to Wagmi and RainbowKit. They handle wallet connections, account changes, and network switching automatically.
  • Improvement: Use TanStack Query (React Query) for your getAmountsOut calls. This gives you built-in loading states, caching, and automatic refetching when the user changes the amount.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions