Capxul Docs
Hooks

Hooks

Catalog of every @capxul/sdk-react hook — TanStack Query under the hood, one reference page per hook.

@capxul/sdk-react exposes the Capxul platform as React hooks. Every data hook is TanStack Query under the hood: queries return UseQueryResult<Data, CapxulError>, mutations return UseMutationResult<Data, CapxulError, Input>, and each hook exports its concrete UseCapxul*Return alias. (A few hooks expose a richer shape — their pages state it exactly.) All hooks must render beneath a CapxulProvider; until its bootstrap resolves, queries simply sit in isPending.

This catalog shrank in alpha.23. The hook surface is being rebuilt domain by domain against the new SDK core, and every hook that had no working backend path behind it was removed rather than left as a shell. The rule going forward is no hook without a working backend path — a hook appears here when its domain ships, not before.

Provider & bootstrap

  • CapxulProvider — the root provider; owns the client bootstrap and the TanStack Query cache.
  • useCapxul — bootstrap status / error / retry, for opt-in splash and error UI.
  • useCapxulClientOrNull — advanced escape hatch: the Core SDK CapxulClient, or null while bootstrapping.

Auth & session

Account

Payments

Organizations

Permissions

  • useCapxulPermissions — list an Organization's Permissions and assignments.
  • useCapxulPermission — read one Permission by id.
  • useCapxulPermissionCreate — create a Budget or managePeople Permission.
  • useCapxulPermissionChange — change an existing Permission.
  • useCapxulPermissionAssign — assign a Permission to an Account.
  • useCapxulPermissionRevoke — revoke a Permission assignment.
  • useCapxulPermissionReplace — replace the Organization's Permission module generation.

Onboarding

Media

  • useCapxulImageUpload — upload an image and bind it as the profile image or an organization logo.

Removed in alpha.23

The following hooks are gone. Nothing consumed them, and each was either a duplicate of a hook that binds directly to a real SDK method, a documented no-op, or a shell with no working backend path behind it.

RemovedUse instead
useCapxulOrguseCapxulOrgs, then select by id — that is all the hook ever did
useCapxulOrganizationAccountuseCapxulOrgTreasury (the real Account, with branded Money)
useCapxulCurrentUseruseCapxulProfile + useCapxulAccountBalance + useCapxulOrgs
useCapxulSwitchActingEntitynothing — it was a documented no-op with no SDK side effect
useCapxulOfframpQuote, useCapxulOfframpStatus, useCapxulOrganizationAuditLognothing yet — these return with their rebuilt domains

The old headless money slot components are also removed. The product owns its screen composition.

On this page