OptionBlazor

This sample shows how you can display an Option<T> on a Blazor component.

Click one of the buttons below to load existing customer details, or see what happens when the customer cannot be found...

Note that as Option<T> is a struct, it cannot be null, so when this page loads, the <OptionBlazor> component will show the None content. If you want to show something that indicates the data has not yet been loaded, please see the <BusyOption> component.

Customer details No customer
An error has occurred. This application may no longer respond until reloaded. Reload 🗙