{"schemaVersion":1,"id":"tanstack-query","name":"TanStack Query","locale":"en","canonicalUrl":"https://base.akulich.dev/en/library/tanstack-query/","officialUrl":"https://github.com/tanstack/query","isCatalog":false,"description":"Manages asynchronous server data in the interface: caches requests, refreshes data, and handles loading and error states.","tasks":["Coordinate server data and interface states","Connect loading/error UI and cache updates after data changes"],"categoryIds":["frontend"],"subcategoryIds":["frontend.utilities","frontend.state"],"tags":["TanStack Query","web","Development"],"aliases":["tanstack/query","tanstack-query","tanstack-query-library"],"platforms":[],"stack":[],"compatibility":null,"pricing":"free","freeUsage":"Code and local use under MIT.","paidUsage":"Computing resources, self-hosting, and external services are paid for separately if used.","license":"MIT for the code; dependencies have separate licenses.","selectionGuide":{"purpose":"Coordinate server data and interface states","chooseWhen":["Coordinate server data and interface states","Connect loading/error UI and cache updates after data changes"],"considerInstead":["When choosing for this topic, compare TanStack Query with SWR. A candidate to compare under the topic: State and client data, Web interface tools. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together.","When choosing for this topic, compare TanStack Query with Immer. A candidate to compare under the topic: State and client data. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together."],"requirements":["Define query and mutation functions, cache keys, and loading/error displays in the application."],"limitations":["Costs and limits of free use: Computing resources, self-hosting, and external services are paid for separately if used.","Terms of use: MIT for the code; dependencies have separate licenses.","Caching does not replace server authorization. Define update and error-handling rules for your data source."],"faq":[{"question":"What can you use for free in TanStack Query?","answer":"Code and local use under MIT."},{"question":"What additional costs might arise with TanStack Query?","answer":"Computing resources, self-hosting, and external services are paid for separately if used."},{"question":"What terms of use matter for TanStack Query?","answer":"MIT for the code; dependencies have separate licenses."},{"question":"How do you get started with TanStack Query?","answer":"Describe the query key and data-fetching function. Connect loading/error UI and cache updates after data changes. Add real data and error handling; check the production build."},{"question":"What does TanStack Query handle when working with server data?","answer":"The library manages fetching, caching, synchronization, and updates of asynchronous state. It supports REST, GraphQL, and other promise-returning sources, refetching, pagination, infinite scrolling, mutations, dependent queries, prefetching, and cancellation. This is a data-state layer, not a ready-made table interface."}],"related":[{"id":"swr","reason":"A candidate to compare under the topic: State and client data, Web interface tools. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together."},{"id":"immer","reason":"A candidate to compare under the topic: State and client data. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together."},{"id":"jotai","reason":"A candidate to compare under the topic: State and client data. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together."}],"sources":["https://github.com/tanstack/query","https://raw.githubusercontent.com/tanstack/query/HEAD/README.md","https://raw.githubusercontent.com/tanstack/query/HEAD/LICENSE","https://www.open-source-tools.com/"]},"selectionCheckedAt":null,"applicationGuide":{"goal":"Coordinate server data and interface states.","inputs":["Web application source code and the intended workflow.","The project's framework and runtime version."],"steps":["Describe the query key and data-fetching function.","Connect loading/error UI and cache updates after data changes.","Add real data and error handling; check the production build."],"checks":["The workflow works after a page refresh and with invalid data.","The bundle, server rendering, and supported browsers suit the project."]},"sources":["https://github.com/tanstack/query","https://raw.githubusercontent.com/tanstack/query/HEAD/README.md","https://raw.githubusercontent.com/tanstack/query/HEAD/LICENSE","https://www.open-source-tools.com/"],"checkedAt":"2026-10-06","reviewScope":"The purpose, current repository license, and separate terms for code, services, and models have been reviewed. The product was not run, and no security audit was performed.","relatedIds":["zustand","jotai","valtio","immer","swr"],"dataVersion":"cbbe7123b47a5ae80983","type":"Web framework / library","kind":"library","pricingNote":"Code and local use under MIT. Computing resources, self-hosting, and external services are paid for separately if used.","notes":null,"labeledSources":[{"url":"https://github.com/tanstack/query","label":"Official source"},{"url":"https://raw.githubusercontent.com/tanstack/query/HEAD/README.md","label":"Official source"},{"url":"https://raw.githubusercontent.com/tanstack/query/HEAD/LICENSE","label":"License"},{"url":"https://www.open-source-tools.com/","label":"Catalog / discovery source"}],"licenseGuides":[{"id":"mit","title":"MIT — permissive license","scope":null,"summary":"You can use, modify, distribute, and sell the code, including in a closed-source commercial product. When sharing copies or substantial portions of the code, retain the license text and copyright notice. You do not need to open-source your entire project; the author provides no warranties.","url":"https://opensource.org/license/mit"}],"entryIds":[],"composition":null}