-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Provide a way to persist prerendered state when using Blazor server-side rendering #49733
Comments
@danroth27 <component type="typeof(Areas.Web.App)"
render-mode="ServerPrerendered"
param-GetIP="@GetIP"
param-GetAgent="@GetAgent"
param-GetCookies="@GetCookies"
param-SessionUser=@SessionStat.User /> If this is not done, we have this effect. edit: |
So how is this now actually done from an application perspective? |
Thanks. Not sure if that has been updated for Blazor 8 Web Apps. I don't have a .cshtml file. |
@oliverw Woops. Sorry. It was the wrong link: https://learn.microsoft.com/en-us/aspnet/core/blazor/components/prerender?view=aspnetcore-8.0#persist-prerendered-state I thought it switched over to the .NET 8 version when I selected it. But it is not the same document. But basically, it is the same. Just no need for a the tag helper anymore. |
Thanks again. Is that supposed to work with |
@oliverw Yes. Since it works with both |
Cool. Trying it out 😄 |
@oliverw 👍🏻 🙂 If you want an example, then there is this: https://github.com/marinasundstrom/Blazor8Test/blob/main/src/Client/Pages/FetchData.razor |
We provide a
persist-component-state
tag helper for persisting state used during prerendering from an MVC view or Razor Page. We need a way to persist the component state from a Blazor component when using server-side rendering (SSR).The text was updated successfully, but these errors were encountered: