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
:
createSessionPersister
function returns a Persister
that uses the browser's session storage.createLocalPersister
function returns a Persister
that uses the browser's local storage.createRemotePersister
function returns a Persister
that uses a remote server.createFilePersister
function returns a Persister
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.
Persisting Data guide
Countries demo
Todo App demos
TinyDraw demo
There is one interface, Persister
, within the persisters
module.
These are the functions within the persisters
module.
There is one type alias, PersisterStats
, within the persisters
module.