isAutoLoading
The isAutoLoading
method lets you find out if the Persister
is currently automatically loading its content.
isAutoLoading(): boolean
returns | boolean | A boolean indicating whether the |
---|
Example
This example creates a Persister
and queries whether it is autoLoading.
import {createSessionPersister} from 'tinybase/persisters/persister-browser';
import {createStore} from 'tinybase';
const persister = createSessionPersister(createStore(), 'pets');
console.log(persister.isAutoLoading());
// -> false
await persister.startAutoLoad();
console.log(persister.isAutoLoading());
// -> true
await persister.stopAutoLoad();
console.log(persister.isAutoLoading());
// -> false
Since
v5.0.0