Server-side rendering JSS applications
Server-Side Rendering (SSR) is essential to enabling integration with Sitecore editors, such as the Experience Editor and Horizon. The Sitecore editors rely on finding the rendered markup of new components being added to the pages when they pre-render them.
It is therefore required to use SSR on Content Management (CM) servers to enable inline editing of data by content authors in the Sitecore editors. On Content Delivery (CD) servers, the primary reason for using SSR is to guarantee SEO compliance.
We recommend rendering JSS applications server-side if you have content that you want to be indexed by search engines.
Using SSR is not recommended for web apps that render user-specific information, such as user portals, or dynamic interfaces that should not be indexed such as e-commerce checkout, food ordering, and so on.
To help you server-side render JSS applications, Sitecore provides rendering engines. Each JSS application you connect and deploy to Sitecore can be configured to use a different rendering engine.
You have several options for server-side rendering JSS applications based on the JSS sample apps for React, Angular, and Vue.js:
You must ensure your JSS app is compatible with server-side rendering.
JSS applications based on the Next.js sample use Next.js-based techniques for server-side rendering.