Introduction
gpui-query is an async state management library for GPUI, the framework behind the Zed editor.
What gpui-query is
Section titled “What gpui-query is”gpui-query brings the async state management patterns of TanStack Query to GPUI. It provides a declarative way to fetch, cache, synchronize, and update server state without manual lifecycle management.
Why gpui-query
Section titled “Why gpui-query”- Zero boilerplate: Define a query, bind it to a view.
- Automatic caching: Responses are cached and deduplicated.
- Built-in retry and error handling: Failed requests are retried with configurable policies.
- Observer pattern: Reactively update your UI when data changes.
- Designed for GPUI: Direct integration with GPUI’s entity and view system.
Next steps
Section titled “Next steps”- Install gpui-query in your project.
- Follow the Quick Start guide to make your first query.
- Explore the API Reference for detailed documentation.
- Read the Guides for patterns and best practices.