saberland/saber
Do you want to work on this issue?
You can request for a bounty in order to promote it!
Use a centralised data store #553
egoist posted onGitHub
<!-- Please don't delete this template or we'll close your issue -->
<!-- Before creating an issue please make sure you are using the latest version of Saber. -->
Feature request
<!-- Please ask questions via following several ways. -->
<!-- https://chat.saber.land/ -->
<!-- https://stackoverflow.com/questions/ask?tags=saberjs -->
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({
//...
})