How-to guides
Handle bootstrap UI
Render retryable startup state without changing data-hook behavior.
Read useCapxul() directly under CapxulProvider. Treat error as nullable
outside the error state and pass retry to an explicit user action:
const { status, error, retry } = useCapxul();
if (status === "bootstrapping") return <StartupSkeleton />;
if (status === "error") return <StartupError error={error} onRetry={retry} />;
return <AuthenticatedApplication />;Do not construct a second SDK client in the gate. retry() asks the provider
to repeat its owned bootstrap, and the provider disposes any client it created
for the previous attempt.
Query hooks can render without this gate: they remain pending while the client context is null. Mutations invoked before readiness instead fail with a typed wrong-state error, so disable action controls until the provider is ready.