Skip to main content

Server-Side Rendering

Server-side rendering (SSR) - is default tramvai rendering mode, which means that for every user request framework will generate HTML page in runtime, and this page content may be completely dynamic and all data will be fresh.

Also it means that all tramvai application code needs to be universal (or isomorphic) - ready to run both on the server and the client.

You can find complete request lifecycle at Application Lifecycle documentation, and how routing works in Navigation Flow page.

SSR has a lot of advantages:

SSR also brings some challenges:

To be able to better handle high loads, tramvai provides a few additional page render modes, which allow the server to do less work when generating HTML - static and client modes. Also, lazy hydration is available to improve client-side loading performance.