Category

Blazor

Blazor framework, component development, and project practice

65 articles
6 Current page
(11/30)Learning Blazor Together: Arbitrary Attributes

(11/30)Learning Blazor Together: Arbitrary Attributes

Currently `MyButton` has 3 `[Parameter]`s. If we need to add more, we would have to define new `[Parameter]`s again. To avoid constantly updating this Component, let's use Blazor's `@attribute`.

StrayaWorker 12/15/2021 10:53 PM
(9/30) Learning Blazor Together: Parameters

(9/30) Learning Blazor Together: Parameters

If we want to add a button to clear the `form` data, the fastest way is to add a `type=”reset”` button. At this point, we use two buttons, which can utilize the core concept of Blazor: component encapsulation.

StrayaWorker 12/14/2021 10:18 PM
(7/30) Learn Blazor Together: Lifecycle (Lifetime)

(7/30) Learn Blazor Together: Lifecycle (Lifetime)

Services you create yourself must be registered in Startup.cs (Blazor Server) or Program.cs (Blazor WebAssemlby), but some basic services don't need to be created by yourself.

StrayaWorker 12/13/2021 9:38 PM