Skip to content
Back to skills

Frontend State Management

ASecurity

Choose and structure frontend state: server cache vs client state vs URL state, with minimal global stores

  • 7 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 30, 2026
ai-agentsreactvuefrontend

Works with

  • cli

Security analysis

A100/100

Scanned November 30, 2026

npx -y skills add ansh44233/forge --skill frontend-state-management --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Frontend State Management?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Frontend State Management
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ansh44233-frontend-state-management/badge)](https://www.skillsdirectory.com/skills/ansh44233-frontend-state-management)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
description: Choose and structure frontend state: server cache vs client state vs URL state, with minimal global stores
profile: full
tags: frontend, state, react, vue
---

# Frontend state management

Most "state management" problems are server data treated as client state.

## Classify state
- **Server state** (fetched data): use a query cache (TanStack Query, SWR, Apollo, Pinia Colada); it handles caching, dedupe, refetch and invalidation.
- **URL state** (filters, tabs, pagination): keep it in the URL so links and back button work.
- **Local UI state:** keep it in the component.
- **Global client state** (auth user, theme, cart): a small store (Zustand, Pinia, signals, context) — only this.

## Rules
- Derive, don't duplicate: compute values from a single source instead of syncing copies.
- Invalidate the right query keys after mutations; use optimistic updates with rollback for snappy UX.

## Verify
Reload the page and use back/forward on the changed screen: state that should persist does, and no request fires twice for the same data (check the network tab or query devtools).

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.