Remote / foldkit-remote/overlay

overlay

function · packages/remote/src/overlay.ts:25

function overlay<AppModel>(
  domain: OverlaidDomain<AppModel>,
  model: AppModel,
  id: string,
  optimistic: ReadonlyArray<OptimisticOperation>,
): AppModel

Shows operations over the store with no request behind them, as a mutation's optimistic ones show while it is in flight: every Selection and view draws them. They stay until lift; showing an id again replaces what it showed. Called from update. A read of an entity only overlays show, lacking a field it selects, is Failed (Overlaid): nothing will fetch that field.