Skip to content

Latest commit

 

History

History
38 lines (24 loc) · 1.25 KB

File metadata and controls

38 lines (24 loc) · 1.25 KB

@languages-learner/data-source

Gravity UI DataSource wiring and app data-layer helpers.

Purpose

One of the two data-fetching systems in the app (the other is TanStack Query). It provides the shared dataManager and query factories built on Gravity UI DataSource, plus loader components. See data-layer.md for when to use which system.

Public API / exports

From src/index.ts:

  • dataManager — the shared DataSource manager (exposed via DataManagerContext).
  • makePlainQuery, makeInfiniteQuery — query factories.
  • DataLoader, DataInfiniteLoader — loader components.
  • getNextPageToken — pagination helper.

Depends on

  • @languages-learner/api — the SDK it fetches through.
  • @languages-learner/class-names — class helpers for its components.
  • @languages-learner/uikit — UI pieces used by the loaders.

Used in

  • apps/web.

Notes

  • Before adding a fetch in a slice, check whether that slice already uses this system or TanStack Query, and don't mix them without a reason — data-layer.md.

Links