Challenge: Blazor Parameters

Test yourself by passing parameters to Razor components.

We'll cover the following


Using the project below, perform the tasks highlighted in the Requirements section.


In the project setup below, we have a Counter Razor component that can accept any arbitrary HTML:

We need to make the following changes to it:

  • When the button is clicked, the number is incremented by a configurable amount and not by 1.

  • The Index component sets this number to 10.

  • When we use the Counter component inside the Index component, the footer of the Counter component should be represented by a heading element with the text Every click increments the count by 10.

Get hands-on with 1200+ tech skills courses.