Overview of TanStack Query in Wagmi Vue
Wagmi Composables use TanStack Query to manage asynchronous data in Vue applications, handling loading/error states, race conditions, and caching.
- Queries: Used for fetching data (e.g., reading a contract). They are tied to a unique Query Key and typically run on mount.
- Mutations: Used for changing data or triggering side-effects (e.g., writing to a contract, switching chains). They are not tied to a query key and are typically triggered by user interaction.