Aspnetcore.docs: 3.1: Partial class support for Razor components

Created on 2 Dec 2019  Â·  8Comments  Â·  Source: dotnet/AspNetCore.Docs

See https://devblogs.microsoft.com/aspnet/asp-net-core-updates-in-net-core-3-1-preview-1/

Add a section for Partial class support for Razor components That I can point to in the what's new in 3.1 guide.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Blazor Source - Docs.ms doc-enhancement

Most helpful comment

That was fast!

All 8 comments

@guardrex any chance you could get this done by noon your time tomorrow?

I'm pretty sure that I can get that done by noon tomorrow. :smile: lol

That was fast!

@guardrex can you provide a link for
Pass parameters to top-level components
Blazor Server apps can now pass parameters to top-level components during the initial render. Previously you could only pass parameters to a top-level component with RenderMode.Static. With this release, both RenderMode.Server and RenderModel.ServerPrerendered are now supported. Any specified parameter values are serialized as JSON and included in the initial response.

For example, you could prerender a Counter component with a specific current count like this:

@(await Html.RenderComponentAsync(RenderMode.ServerPrerendered, new { Cur

Use this one (version is important, so link to 3.1) ...

https://docs.microsoft.com/en-us/aspnet/core/blazor/components?view=aspnetcore-3.1#integrate-components-into-razor-pages-and-mvc-apps

... there's an existing PR for the components topic. I'd like to make the call out more explicit than what the example there shows. However, it's fairly obvious that the param is passed there as it is.

I added a line to that section to surface it a bit more. That will merge shortly. You can go ahead with that link :point_up: versioned for 3.1.

3.1 becomes the default tomorrow.
Thanks.

Was this page helpful?
0 / 5 - 0 ratings