Go to content

Migrating from state management to react-query. I’m sorry, what?! - By Adam Klein

It’s time to admit - we were wrong. State management solutions are great, but unfitting for server-side data. Server-side data needs special care, like async behavior built-in, caching, deduping, re-fetching, prefetching, loading states, error states, pagination, and more. And us - we kept struggling with state management solutions and re-invented the wheel. The good news is that now we have react-query. And even better - we have hooks, so combining server and client state is easier than ever. Let’s explore this new architecture based on react-query, together, and learn how we can benefit from its flexibility and simplicity.

October 15, 2021