Skip to content

Instantly share code, notes, and snippets.

@lorensr
Created April 2, 2020 09:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lorensr/4807e44c38616360cb09b3831c703e51 to your computer and use it in GitHub Desktop.
Save lorensr/4807e44c38616360cb09b3831c703e51 to your computer and use it in GitHub Desktop.
import FooDataSource from './FooDataSource'
import { reportError } from './utils'
export default class MyFooDB extends FooDataSource {
async updateFields(id, fields) {
const doc = await this.get(id)
return this.update(id, {
...doc,
...fields
})
}
didEncounterError(error) {
reportError(error)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment