Skip to content

Blazor Web App template should enable server interactivity by default #49314

@danroth27

Description

@danroth27

The default Blazor Web App template is only setup for server-side rendering. It doesn't enable any interactivity modes. The means that commonly used Blazor features, like registering UI event handlers (@onclick, @bind, etc) simply don't work and nothing will tell you why. Defaults should reflect the most common use cases. It seems reasonable to expect that most Blazor users will want some form of interactivity, so the current default creates an initial pit of failure.

Proposal:

  • Enable server interactive rendering mode by default. The overhead of enabling server interactivity for what is already a server centric app seems minimal: You get the Blazor Server hub, which you might not be using. To disable the hub you simply remove the call to AddServerComponents().
  • Enabling the WebAssembly rendering mode should still be optional given the complexities involved with setting up a separate project.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions