state-management

Guide state architecture decisions for TanStack Query, Zustand, React Hook Form, and URL patterns.

6|3|Updated Jan 2, 2026
One-click install
npx skills add https://github.com/mgd34msu/goodvibes-plugin --skill state-management-mgd34msu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: state-management
Source: https://github.com/mgd34msu/goodvibes-plugin/tree/main/plugins/goodvibes/skills/outcome/state-management
Command: npx skills add https://github.com/mgd34msu/goodvibes-plugin --skill state-management-mgd34msu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and scripts (resource) components.

What problem does it solve?

This Skill helps you make informed decisions about state management architecture in your application, ensuring efficient data flow and maintainable code.

Core Features & Use Cases

  • State Strategy Guidance: Provides clear recommendations for choosing between TanStack Query, Zustand, React Hook Form, and other solutions based on state type (server, client, form, URL).
  • Implementation Patterns: Offers code examples and best practices for setting up and using popular state management libraries.
  • Use Case: When building a new feature that involves complex user input forms and fetching data from an API, this Skill will guide you to use React Hook Form with Zod for the forms and TanStack Query for data fetching, providing code snippets for each.

Quick Start

Use the state-management skill to choose the best solution for managing server data in my React application.

Frequently Asked Questions about state-management

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is the best way to manage server state and data fetching in React?

For server state and data fetching, TanStack Query is recommended to efficiently fetch, cache, and update server data. This approach separates asynchronous server state from client state, ensuring maintainable data flow.

When should I use Zustand over other state management libraries?

Zustand is recommended for managing client state when you need a lightweight, flexible solution for UI interactions. It handles global state without boilerplate, keeping client-side architecture clean and performant.

How do I handle complex form state and validation in my application?

To handle complex form state, use React Hook Form combined with Zod for robust schema validation. This pairing provides structured implementation patterns for managing user input and ensuring data integrity before submission.

Can I use TanStack Query and Zustand together in the same application?

Yes, you can use TanStack Query and Zustand together. This Skill guides state architecture decisions by separating server data fetching with TanStack Query and client UI state with Zustand for efficient data flow.

What patterns exist for managing URL state in a React application?

URL state patterns involve synchronizing application state with the URL to support routing and shareable links. This Skill provides architectural guidance on integrating URL state alongside server, client, and form state.