Grokking React Advanced
0% completed
Understanding React Query
Mount the same user list twice on one page, and the browser sends two identical requests for the same data. Hide the list and show it again, and it sends two more, while the screen shows "Loading..." in the meantime. Nothing in that code is wrong by the rules of React Fundamentals. The waste comes from where the data lives.
This chapter introduces TanStack Query, the library most people still call React Query. It keeps data that comes from a server in one shared cache, outside your components, and it decides when to fetch, when to reuse and when to refresh that data.
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%