Appearance
Svelte
Use the trueLink store-like helper.
svelte
<script lang="ts">
import { trueLink } from "true-link/svelte";
const v = trueLink({ pingUrl: "/health" });
</script>
<div style="padding:12px;border:1px solid #ddd">
{#if $v}
<div>Online: {$v.isOnline}</div>
<div>Strength: {$v.strength}</div>
<div>Latency: {$v.latency ?? 'n/a'}ms</div>
{/if}
</div>If this library helps, you can support development.