From the course: Build Modern Web Apps with React, Hooks, State Management, and APIs Using Vite or Next.js

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Key benefits and summary

Key benefits and summary

Hello and welcome back, in this video we will discuss the key benefits of using 10-stack query and query libraries. The first benefit we get is caching, we can avoid making redundant network requests and we can cache the data and serve the user from the cache which is very fast and efficient. Then we have the optimistic updates. It makes our UI faster and smoother user experience is provided. The error handling mechanism improves as well. Based on built-in retry and fallback mechanisms with the query libraries. Then we have the automatic refetching. Whenever the data has been mutated, we can have the updated data without making another API call or having a specific code piece for that. The query library handles that automatically. So to summarize, when we are using traditional XEOs, we have to handle things manually like state and the error handling logic. The query libraries such as tanstack and rtkquery simplified this and they are simplified, declarative and being used for scaling…

Contents