Whenever you're ready, walk me through how you'd approach this.
What tools do you use for state management in JavaScript applications?
Discuss how you choose among React useState, useReducer, Context, Redux Toolkit, Zustand, and server-state tools such as TanStack Query. Explain the trade-offs, including ownership, update propagation, debugging, persistence, asynchronous data, and avoiding unnecessary global state.
Keep the answer focused on JavaScript applications, especially React applications, and describe one concrete example of selecting a tool for a feature.