·
Last changedVersion:
This version passed the hardening gate. Hardening applied 3 targeted changes and preserved all other text. Classified findings before hardening: 0. Classified findings closed: 0. Classified findings remaining: 0. Unclassified scanner findings remaining: 0. Review findings closed: 0. Review findings remaining: 5.
None
None
Expand | File | Group | Subtype | Severity | Status |
|---|
No findings available
0 findings
Comprehensive guide to modern React state management patterns, from local component state to global stores and server state synchronization.
| Type | Description | Solutions |
|---|---|---|
Local State | Component-specific, UI state | useState, useReducer |
Global State | Shared across components | Redux Toolkit, Zustand, Jotai |
Server State | Remote data, caching | React Query, SWR, RTK Query |
URL State | Route parameters, search | React Router, nuqs |
Form State | Input values, validation | React Hook Form, Formik |
Note: this example persists the whole store, including the user, to browser storage. In real apps, persist only harmless UI preferences such as the theme, and keep tokens, credentials and personal data out of browser storage. Clear user data on logout. Enable the devtools middleware only in development builds and turn it off for production, because it exposes the full store. In real components, subscribe with selectors that read only the fields a component needs, as shown in the detailed patterns.
Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.
Get started with chainctlchainctl skill install public/wshobson/react-state-management:latest
Bring Chainguard's hardening pipeline to your first-party skills — custom rulesets, automated remediation, full audit trail.
skills.cgr.dev/public/github.com/wshobson/plugins/frontend-mobile-development/skills/react-state-management:latest
MIT
HARDENING.md
LICENSE
SKILL.md
references/details.md