Dev Builds .NET + React Site Where Chromium Pre-Renders Islands at Publish Time
A developer has built a hotel-and-editorial website using ASP.NET Core 10 Razor Pages, React islands, PostgreSQL, and a Node/Playwright worker that pre-renders interactive components before any visitor arrives. The architecture separates responsibilities cleanly: Razor handles page content and SEO-friendly HTML, while React islands manage interactive elements like galleries and search controls. Rather than running Chromium on every visitor request or relying on a JavaScript-dependent SPA shell, a background Playwright worker renders the React islands at publication time and stores the completed HTML in PostgreSQL. When a visitor requests a page, the gateway serves the pre-built HTML document directly, and the visitor's browser then hydrates the already-populated islands for interactivity. This approach ensures public content and search results remain accessible without JavaScript, while treating interactive controls as a progressive enhancement.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.



Discussion (0)
Log in to join the discussion and vote.
Log in