Remote / foldkit-remote

plannedStore

function · packages/remote/src/optimistic.ts:252

function plannedStore(
  base: EntityStore,
  visible: EntityStore,
  optimistic: OptimisticState,
): EntityStore

The store a read plans over: the visible store, except that a row the server holds is planned by what the server holds of it, so a field only a layer shows is still fetched. Its values stay the visible ones, so a relation a layer points elsewhere is followed where it points. A row only a request holds and a row a layer deletes are planned as shown; the first is then left out of the read (heldOnlyByRequests).