抛弃那些细粒度的状态管理、手动重新获取和无尽的异步意大利面条代码吧。TanStack Query 为您提供声明式、始终最新的自动管理查询和变更,它们 (Toss out that granular state management, manual refetching and endless bowls of async-spaghetti code. TanStack Query gives you declarative, always-up-to-date auto-managed queries and mutations that) 直接改善您的开发者和用户体验 (directly improve both your developer and user experiences).
(或查看我们的官方课程 👇) (or check out our official course 👇)
TanStack Query 零依赖,鉴于它提供的密集功能集,它非常精简。从周末爱好到企业级电子商务系统(是的,我正在看着你,沃尔玛!😉),TanStack Query 是久经考验的工具,可帮助您以您的创造力速度取得成功。(With zero dependencies, TanStack Query is extremely lean given the dense feature set it provides. From weekend hobbies all the way to enterprise e-commerce systems (Yes, I'm lookin' at you Walmart! 😉), TanStack Query is the battle-hardened tool to help you succeed at the speed of your creativity.)
与其编写 reducers、缓存逻辑、计时器、重试逻辑、复杂的 async/await 脚本(我可以继续列举...),不如说您只需编写通常所需代码的一小部分。当您使用 TanStack Query 时,您会惊讶于自己编写的代码如此之少,或者删除了多少代码。通过下面的示例之一尝试一下吧!