Skip to content
On this page

Server side rendering (SSR)

One of the most important and difficult to implement part of SSR is data-fetching. Farfetched aims to make it smooth and easy.

Farfetched is based on Effector, that have an excellent support of SSR, so you can handle data-fetching easily if you follow some simple rules:

That is it, just start your application on server and wait for all computation finished:

ts
async function renderApp() {
  const scope = fork();

  await allSettled(appStarted, { scope });

  const html = renderUI(scope);

  return html;
}

Released under the MIT License.