--- title: ASP.NET Core Razor class libraries (RCLs) with static server-side rendering (static SSR) author: guardrex description: Learn how component authors can support static server-side rendering (static SSR) in ASP.NET Core Razor class libraries (RCLs). monikerRange: '>= aspnetcore-8.0' ms.author: riande ms.custom: mvc ms.date: 11/12/2024 uid: blazor/components/class-libraries-with-static-ssr --- # ASP.NET Core Razor class libraries (RCLs) with static server-side rendering (static SSR) [!INCLUDE[](~/includes/not-latest-version-without-not-supported-content.md)] This article provides guidance for component library authors considering support for static server-side rendering (static SSR). Blazor encourages the development of an ecosystem of open-source and commercial component libraries, formally called *Razor class libraries (RCLs)*. Developers might also create reusable components for sharing components privately across apps within their own companies. Ideally, components are developed for compatibility with as many hosting models and rendering modes as possible. Static SSR introduces additional restrictions that can be more challenging to support than interactive rendering modes. ## Understand the capabilities and restrictions of static SSR Static SSR is a mode in which components run when the server handles an incoming HTTP request. Blazor renders the component as HTML, which is included in the response. Once the response is sent, the server-side component and renderer state is discarded, so all that remains is HTML in the browser. The benefit of this mode is cheaper, more scalable hosting, because no ongoing server resources are required to hold component state, no ongoing connection must be maintained between browser and server, and no WebAssembly payload is required in the browser. All existing components can still be used with static SSR. However, the cost of this mode is that event handlers, such as `@onclick`†, can't be run for the following reasons: * There's no .NET code in the browser to run them. * The server has immediately discarded any component and renderer state that would be needed to execute event handlers or to rerender the same component instances. †There's a special exception for the `@onsubmit` event handler for forms, which is always functional, regardless of render mode. This is equivalent to how components behave during [prerendering](xref:blazor/fundamentals/index#client-and-server-rendering-concepts), before Blazor's SignalR circuit or the .NET WebAssembly runtime is started. For components whose only role is to produce read-only DOM content, these behaviors for static SSR are completely sufficient. However, library authors must consider what approach to take when including interactive components in their libraries. ## Options for component authors There are three main approaches: * **Don't use interactive behaviors** (Basic) For components whose only role is to produce read-only DOM content, the developer isn't required to take any special action. These components naturally work with any render mode. Examples: * A "user card" component that loads data corresponding to a person and renders it in a stylized UI with a photo, job title, and other details. * A "video" component that acts as a wrapper around the HTML `