Skip to content

Introduction

gpui-query is a zero-boilerplate async state management library for GPUI, the framework behind the Zed editor.

gpui-query brings the async state management patterns popularized by libraries like TanStack Query to the GPUI framework. It provides a declarative way to fetch, cache, synchronize, and update server state in your GPUI applications without the boilerplate of manual lifecycle management.

  • Zero boilerplate: Define a query, bind it to a view, and let the library handle the rest.
  • 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.