Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4170

How Do I Determine the Criteria for Allocating Pages to the Client Project in ASP.NET Core Blazor United .NET 8?

$
0
0

Blazor United in .NET 8 creates two projects,

enter image description here

  1. "BlazorApp1" project
  2. "BlazorApp1.Client" project.

I understood that, "BlazorApp1" is designated for Static Server and WebSocket pages, I cannot or I should not use @rendermode InteractiveWebAssembly or @rendermode InteractiveAuto in the "BlazorApp1" project.

Then, I assumed that, in the "BlazorApp1.Client" project, I should or I can use pages with attribute only @rendermode InteractiveWebAssembly. But, surprisingly I see that, I can use @rendermode InteractiveServer in a page in the "BlazorApp1.Client". And it works without any error. In fact, I can use regular Statis Server pages in that "BlazorApp1.Client" project.

This discovery leads me to question the necessity of distributing pages between two projects.

If "BlazorApp1.Client" supports all render modes specially InteractiveServer, is there a compelling reason not to consolidate all pages there for organizational simplicity?

I really hate the idea to distribute my pages between two projects, and I discovered that, I do not need to distribute my pages between two projects, I can rather have all of pages into the "BlazorApp1.Client" project where I can have different render modes including InteractiveServer. Then why should I bother hosting some InteractiveServer pages into the BlazorApp1 page? What is the catch here?


Viewing all articles
Browse latest Browse all 4170

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>