hasRow
The hasRow
method returns a boolean indicating whether a given Row
exists in the Store
.
hasRow(
tableId: Id,
rowId: Id,
): boolean
Example
This example shows two simple Row
existence checks.
const store = createStore().setTables({pets: {fido: {species: 'dog'}}});
console.log(store.hasRow('pets', 'fido'));
// -> true
console.log(store.hasRow('pets', 'felix'));
// -> false