From the course: Blazor: Getting Started

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Challenge: Respond to an event in a subcomponent

Challenge: Respond to an event in a subcomponent - Blazor Tutorial

From the course: Blazor: Getting Started

Start my 1-month free trial

Challenge: Respond to an event in a subcomponent

(upbeat music) - [Instructor] It's time for our first challenge. Let's take some of what we've learned in the chapter and put it into practice. The RayList component is currently waiting for the data service to update the RayList before it re-renders. But I would like the RayList to begin a loading animation as soon as the ray is cast by the right input component in case of a slow server connection. The loader can be hidden when the load completes. Use the bootstrap class spinner-border in a div on the RayList to indicate that the rays are being reloaded. Add an event to the RayInput that the RayList can bind to to know when to show the loader. For bonus points, start the loading animation whenever the component loads and not just when a ray is cast. Hide it any time the RayList update is complete.

Contents