Site / With Remote and SSR

When it goes wrong

  • A read fails. In the browser the page shows failed, and the store still holds what it held. On the server, Data.satisfy fails with the read's own error (RemoteQueryError, RemoteReadError), so the server chooses: an error page, or a retry. A static build stops rather than write a page without its data.
  • A read keeps revealing more. Data.satisfy stops after a bounded number of passes (8 by default) and fails with RemoteUnsatisfied, naming the Surface, rather than serving a page still loading.
  • The view reads something that does not cross. SSR.render fails with ResumeUnsafe and names the field or the Surface. Add it to state, or to local when it should start from the baseline on purpose.
  • A served page is out of date, or for another reader. SSR.hydrate's when and fresh decline it, and otherwise: 'render' draws afresh in its place. until keeps the served page in view until the fresh one has its reads, as the CMS's sitePlan.ts does.
  • The reader leaves a page. Its Surface goes inactive, and after a grace period Remote collects what nothing else reads. That is safe: the server still owns the facts, and coming back fetches them again.