Advanced / Interop & Async

NotReadyError

Thrown by a tracked read whose value is currently pending (an async memo / createSignal(asyncFn) / projection / store derivation that hasn't settled yet). Surfacing through the reactive graph is what suspends the consumer scope — the nearest enclosing <Loading> boundary catches the throw and renders its fallback until the source resolves.

App code rarely catches this directly; <Loading> is the canonical handler. The error type is exposed for advanced cases — e.g. Interop layers that bridge Solid's pending-throw protocol to a different async strategy, or tests that want to assert on the suspension shape.


Import

import { NotReadyError } from "solid-js";

Type signature

class NotReadyError extends Error {
constructor(public source: any) {
super();
}
}

Examples

// Advanced: distinguish "not ready yet" from a real error in custom
// boundary plumbing. App code should rely on `<Loading>` / `<Errored>`.
try {
const value = readReactiveSource();
} catch (err) {
if (err instanceof NotReadyError) throw err; // re-throw to suspend
reportError(err);
}
Last updated: 7/4/26, 6:21 PMEdit this pageReport an issue with this page