Not a Real DB
A "fake" database for reactjs react-native that stores data in local storage, for sample applications.
Usage
Create a DataStore
instance specifying by name to store the data. then run load for get old data
const DataStore = ; const apples = "apples";const oranges = "oranges";await apples;await oranges;
You can then manipulate each collection using the following CRUD operations:
// create a new item; returns a generated idconst id = await apples; // => 'BJ4E9mQOG' // list all items in a collectionapples; // => [{id: 'BJ4E9mQOG', variety: 'Gala', weight: 133}] // get a single itemapples; // => {id: 'BJ4E9mQOG', variety: 'Gala', weight: 133} // update an itemawait apples; // delete an itemawait apples;
That's it. few operations are asynchronous.