Skip to content

useConsoleSdk

useConsoleSdk(): ConsoleSdkResult

Defined in: console-sdk/src/react/hooks/useConsoleSdk.ts:56

Reactive SDK lifecycle: hydration status, the hydration failure (if any), and the restart() recovery action. Safe from the first render — while status is 'starting' every other hook already returns its documented zero state (SDK_PLAN.md §3.9.1). Throws OutsideProviderError when no <ConsoleProvider> is above the caller.

ConsoleSdkResult

const { status, error, restart } = useConsoleSdk();
if (status === 'error') return <ErrorCard error={error} onRetry={restart} />;