persisters
The persisters
module of the TinyBase project provides a simple framework for saving and loading Store
data, to and from different destinations, or underlying storage types.
Several entry points are provided, each of which returns a new Persister
object that can load and save a Store
:
- The
createSessionPersister
function returns aPersister
that uses the browser's session storage. - The
createLocalPersister
function returns aPersister
that uses the browser's local storage. - The
createRemotePersister
function returns aPersister
that uses a remote server. - The
createFilePersister
function returns aPersister
that uses a local file (in an appropriate environment).
Since persistence requirements can be different for every app, the createCustomPersister
function can also be used to easily create a fully customized way to save and load Store
data.
See also
Persisting Data guide
Countries demo
Todo App demos
Drawing demo
Interfaces
There is one interface, Persister
, within the persisters
module.
Functions
These are the functions within the persisters
module.
Type Aliases
There is one type alias, PersisterStats
, within the persisters
module.