Userbase

Docs : SDK : openDatabase

openDatabase lets you retrieve your user's data. You also need to have a database open before storing or modifying user data. This API will return a promise that gets resolved once the database becomes available for use.

userbase.openDatabase({
  databaseName: 'example-database-name',
  changeHandler: function (items) {
    // update your application state with the database items
  }
}).then(() => {
  // the database can now be used
}).catch((e) => console.error(e))

Parameters

Advanced Parameters

Notes

Errors