Skip to content

Instantly share code, notes, and snippets.

@jonhilt
Last active October 7, 2020 10:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonhilt/88fffb7d9ce8de0997d8024910c63957 to your computer and use it in GitHub Desktop.
Save jonhilt/88fffb7d9ce8de0997d8024910c63957 to your computer and use it in GitHub Desktop.
Prerendering Blazor WASM components
@page
@using PracticalAspNet.UI.Client.Pages
@model IndexModel
@{
ViewData["Title"] = "Home page";
}
<div class="text-center">
<script src="_framework/blazor.webassembly.js"></script>
<component type="typeof(Counter)" render-mode="WebAssemblyPrerendered"/>
<!-- works if I add this -->
<div id="app" class="d-none"></div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment