Pular para o conteúdo
Kitbay
SkillOficial

frontend-data-fetching

NOASSERTIONAtualizado em 11 de nov. de 202645.751Estrelas no GitHub

A maintainer skill in Sentry's own repository for how React code in its frontend calls the Sentry API, using TanStack Query with Sentry's apiOptions helper.

O que a skill ensina

A maintainer skill in Sentry's own repository for how React code in its frontend calls the Sentry API, using TanStack Query with Sentry's apiOptions helper. It lists the approved helpers for queries, mutations, conditional queries and manual fetches, and marks older helpers as deprecated. Rules require an explicit stale time, reusable abstractions built on the options object rather than on hooks, letting TypeScript infer types instead of passing generics, typing mutation inputs rather than hook generics, and treating errors as plain Error narrowed at runtime. It also explains that the cache holds both JSON and headers and how to read pagination and hit-count headers with a select helper.

O que faz

  • Write queries and mutations with apiOptions
  • Disable a query conditionally
  • Read pagination and hit-count headers
  • Avoid deprecated query helpers