12. Mutate
context.mutate(slug)
async· returnsvoid
Forces an immediate re-fetch of all data for the specified entity, causing any components that display that data to re-render with the latest values. Use this after creating, updating, or deleting records to ensure the UI reflects the changes without a full page reload.
Prop
Type
await context.updateEntity("invoices", context.router.id, { Status: 3 });
await context.mutate("invoices");
context.toast.success("Invoice status updated.");
context.mutate is especially important after bulk operations or when multiple components on the same page display data from the same entity. Without it, components may continue showing stale data until the next natural refresh.