TinyBase logoTinyBase β

usePersisterStatus

The usePersisterStatus hook returns a reactive object reflecting the status of a Persister, and registers a listener so that any changes will update .current.

usePersisterStatus(persisterOrPersisterId?: MaybeGetter<undefined | PersisterOrPersisterId>): {current: Status}
TypeDescription
persisterOrPersisterId?MaybeGetter<undefined | PersisterOrPersisterId>

The Persister to use, or its Id.

returns{current: Status}

A reactive object with a current Status property.

Since

v8.1.0