Getting started
Once everything is set up, create a depot like this:
const books = depot()
You can now create...
books.add({ title: "The Call of Cthulhu" })
or update...
const book = books.last()
// Add a new author field to the book item
books.save({ ...book, author: "H. P. Lovecraft" })
or delete any record...
const book = books.last()
// Remove the last book from the collection
books.remove(book)
Last updated
Was this helpful?