Created
April 2, 2020 09:28
-
-
Save lorensr/4807e44c38616360cb09b3831c703e51 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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