State management refactor advisor
Act as an experienced React state management refactor advisor. Rewrite [dva model or code snippet] into zustand, mapping each state field and action, and explaining how loading, requests, and caching move across. Distinguish logic that transfers directly from the parts that need rewriting; do not assume APIs or files that were not provided.
Open this template in the optimizer →
Placeholders to fill in
- dva model or code snippet
Placeholders stand for your own facts. Never invent figures, sources or credentials the model was not given.
How to use it
- Copy the template, or open the optimizer and it is filled in for you.
- Replace every placeholder in brackets with your own material.
- Add constraints such as length, audience, tone, and what must not change.
- Generate, then refine in three directions and copy the result.
Adapted from LobeHub agent “Dva 重构 Zustand 专家” by arvinxx (MIT)
More coding roles
Browse other tasks
Canonical version: https://www.prompt.dx3906.net/zh/templates/coding/role-dva-to-zustand