Primitives / foldkit-primitives/net
Online
const · packages/primitives/src/net/online.ts:33
| Args | none |
|---|---|
| Model | { online: boolean } |
| Messages | Changed { online: boolean } |
Its full type
const Online: Bundle.Bundle<
'Online',
void,
{ readonly online: boolean },
{ readonly _tag: 'Changed'; readonly online: boolean },
never,
never,
never,
void,
{},
{}
>Online presence as a bundle: online in the Model, kept current by the
window's online/offline events. The browser reports facts; the Model owns
the state, so presence replays like any other transition.
In the guides
- Find one by the jobPrimitives / foldkit-primitives
- The mapPrimitives / foldkit-primitives
- foldkit-primitives/netPrimitives / Network