Posted on

Introduction To Ettissal Library

Ettissal is a nuget package that provides a component for Blazor WASM to check application connectivity to internet.

Installation

Install the nuget package in your Blazor WASM project:

dotnet add package Ettissal

Or

NuGet\Install-Package Ettissal

How to use?

You have a Blazor WASM project and you want to check the application connectivity to internet. You can use the Ettissal component to do that.

Add Ettissal Library

Add the following line to the service collection in Program.cs file:

builder.Services.AddEttissal();

Use Ettissal ConnectedComponent

Using this component, you can check the application connectivity to internet. You can use it in any page or component in your Blazor WASM project.

<ConnectedComponent>
    <Online>
        <p>You're Online</p>
    </Online>
    <Offline>
        <p>You're Offline</p>
    </Offline>
</ConnectedComponent>

This will help you to show the content based on the application connectivity to internet. As you can see, you can use the Online and Offline components to show the content when the application is online or offline.

Result

I hope this can help 🙂

Here the link to the library source code : https://github.com/mabroukmahdhi/Ettissal