Skip to content

React guides

These guides cover @pbvex/react, a React hook layer over @pbvex/client.

Topics

  • ProviderPBVexProvider and PBVexContext.
  • HooksuseQuery, useQueryResult, useMutation, useAction, useSubscription, and usePBVexClient.
  • Patterns — loading, error boundaries, skip, stable args, and cleanup.
  • TestingrenderHook, PBVexProvider, and mock transports.

Core concepts

  • One PBVexProvider provides a Client to the component tree.
  • useQuery returns the latest query value or undefined while loading.
  • useQueryResult returns the full { data, error, isLoading } state.
  • Mutations and actions are stable callables returned by hooks.
  • All subscriptions use useSyncExternalStore with a shared QueryStore.

Generated API reference. Source of truth is the codebase.