Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/earthstar/mod.ts>Replica#onEvent

Earthstar is a tool for private, undiscoverable, offline-first networks.
Go to Latest
method Replica.prototype.onEvent
Re-export
import { Replica } from "https://deno.land/x/earthstar@v10.0.0-alpha.2/mod.ts";

Provide a callback to be triggered every time a replica event occurs.

Parameters

callback: (event: ReplicaEvent<DocBase<FormatName>>) => void | Promise<void>