TinyBase logoTinyBase

delTable

The delTable method lets you remove a single Table from the Store.

delTable(tableId: Id): Store
TypeDescription
tableIdId

The Id of the Table in the Store.

returnsStore

A reference to the Store.

Example

This example removes a Table from a Store.

const store = createStore().setTables({
  pets: {fido: {species: 'dog'}},
  species: {dog: {price: 5}},
});
store.delTable('pets');

console.log(store.getTables());
// -> {species: {dog: {price: 5}}}