delTable
The delTable
method lets you remove a single Table
from the Store
.
delTable(tableId: string): this
Example
This example removes a Table
from a Store
.
import {createStore} from 'tinybase';
const store = createStore().setTables({
pets: {fido: {species: 'dog'}},
species: {dog: {price: 5}},
});
store.delTable('pets');
console.log(store.getTables());
// -> {species: {dog: {price: 5}}}
Since
v1.0.0