01 · Before and afterThe pattern
Re-hydrate the dependent stores as one unit, and keep a shared decision in the store.
async function setStatus(key: string, status: 'active' | 'inactive') {
await api.patch(`/tables/${key}`, { meta: { status } });
// the server also hides this table's fields and relations
await Promise.all([tables.hydrate(), fields.hydrate(), relations.hydrate()]);
}
// store: one rule, used both to skip the query and to show the notice
const isPanelInactive = (p) => isInactive(p.options.table) || queryTables(p).some(isInactive);02 · Run it on your appThe check
After an admin action changes what the server returns, does your app refresh every cached store that depends on it, or only the one you edited?
If the honest answer is no or not sure, this is worth a look before it reaches production.