Write a React custom hook called [useSomething] that [purpose, e.g. fetches data with caching / debounces input / tracks window size]. Use TypeScript, handle cleanup and errors, and include usage examples and tests.
Results for “state management”
All tools
ChatGPT
Claude
Gemini
Midjourney
DALL·E
Stable Diffusion
Flux
Copilot
Runway
Sora
Veo
Kling
Suno
Udio
ElevenLabs
Other
2 prompts
My [framework] app has these needs: [describe shared state, server data, forms]. Recommend a state management approach (e.g. built-in state, Context, Zustand, Redux Toolkit, React Query), explain why, and show the setup with one example feature.
Coding & Development
State management setup
Chooses and sets up state management for a frontend app.