type CollectionStatus = "idle" | "loading" | "ready" | "error" | "crashed" | "cleaned-up";Defined in: packages/db/src/types.ts:769
Collection status values for lifecycle management
// Check collection status
if (collection.status === "loading") {
console.log("Collection is loading initial data")
} else if (collection.status === "ready") {
console.log("Collection is ready for use")
}// Status transitions
// idle → loading → ready (when markReady() is called)
// loading → error when the sync adapter calls fail() before the first ready
// any active status → crashed when local storage or an invariant breaks
// After the first ready, sync problems appear in `health`, not in `status`.