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.satisfyfails 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.satisfystops after a bounded number of passes (8 by default) and fails withRemoteUnsatisfied, naming the Surface, rather than serving a page still loading. - The view reads something that does not cross.
SSR.renderfails withResumeUnsafeand names the field or the Surface. Add it tostate, or tolocalwhen it should start from the baseline on purpose. - A served page is out of date, or for another reader.
SSR.hydrate'swhenandfreshdecline it, andotherwise: 'render'draws afresh in its place.untilkeeps the served page in view until the fresh one has its reads, as the CMS'ssitePlan.tsdoes. - 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.
Where to read next
- Site and Foldkit's Router: what the Site adds to routing, and how.
- Creating a site: the Site's features one at a time.
foldkit-remoteREADME: policies, mutations, live data and retention.foldkit-ssrREADME: the handover, static regions, resumable pages and forms without scripts.