Reference
CapxulProvider reference
Props, ownership, bootstrap states, and cache behavior.
CapxulProvider requires exactly one bootstrap mode.
| Prop | Mode | Meaning |
|---|---|---|
publishableKey: string | created client | required bootstrap credential |
client: CapxulClient | injected client | caller-owned, already-created client |
requirement? | created client | none, counterfactual, or deployed readiness target |
signer? | created client | optional consumer-held deployment signer |
observation? | created client | host-owned SDK failure observation adapter |
queryClient? | both | TanStack cache pinned at mount |
children | both | React subtree receiving both contexts |
Created-client mode calls createCapxulClient, exposes bootstrap status, and
closes the created client on teardown or re-bootstrap. Injected-client mode is
ready immediately and leaves disposal with the caller.
useCapxul() returns:
type CapxulBootstrapStatus = "bootstrapping" | "ready" | "error";
interface CapxulBootstrapState {
status: CapxulBootstrapStatus;
error: CapxulError | null;
retry(): void;
}