saber icon indicating copy to clipboard operation
saber copied to clipboard

Use a centralised data store

Open egoist opened this issue 6 years ago • 0 comments

Feature request

What problem does this feature solve?

Saber has a api.pages object you can use to store pages, but in practice you also need to store data for authors, tags etc.

What does the proposed API look like?

const Page = api.store.createCollection('page', {
  insertFilter(input) {
    return normalizePage(input)
  }
})

const allPages = Page.find() // => [{}, {}, ...]
Page.insert({
 //...
})

egoist avatar Nov 04 '19 13:11 egoist