Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Blazor NET.8] Add global option for disable pre-rendering #50744

Closed
1 task done
mihaimyh opened this issue Sep 15, 2023 · 2 comments
Closed
1 task done

[Blazor NET.8] Add global option for disable pre-rendering #50744

mihaimyh opened this issue Sep 15, 2023 · 2 comments
Labels
area-blazor Includes: Blazor, Razor Components ✔️ Resolution: Answered Resolved because the question asked by the original author has been answered. question Status: Resolved

Comments

@mihaimyh
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

We are using Blazor for some few sites in our company where we don't need prerendering.
Previous of .NET 8 it was easy to switch it off in using render-mode="Server" but now with the new attributes RenderModeAuto, RenderModeServer, RenderModeWebAssembly I need to use the overload which accepts a boolean to turn it off (and sometimes it can be forgotten).

Could we configure this globaly somewhere else? in configure services, or any other place?

Describe the solution you'd like

Have a global option for disable prerendering for all the components in the app without using the overload of the new RenderMode attributes.

Additional context

No response

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-blazor Includes: Blazor, Razor Components label Sep 15, 2023
@javiercn
Copy link
Member

@mihaimyh thanks for contacting us.

You can extend InteractiveServerRenderMode to create your own NonPrerenderedServerRenderMode and use that everywhere in your app.

@javiercn javiercn added question ✔️ Resolution: Answered Resolved because the question asked by the original author has been answered. labels Sep 27, 2023
@ghost ghost added the Status: Resolved label Sep 27, 2023
@ghost
Copy link

ghost commented Sep 28, 2023

This issue has been resolved and has not had any activity for 1 day. It will be closed for housekeeping purposes.

See our Issue Management Policies for more information.

@ghost ghost closed this as completed Sep 28, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Oct 28, 2023
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components ✔️ Resolution: Answered Resolved because the question asked by the original author has been answered. question Status: Resolved
Projects
None yet
Development

No branches or pull requests

2 participants