React guides
These guides cover @pbvex/react, a React hook layer over @pbvex/client.
Topics
- Provider —
PBVexProviderandPBVexContext. - Hooks —
useQuery,useQueryResult,useMutation,useAction,useSubscription, andusePBVexClient. - Patterns — loading, error boundaries,
skip, stable args, and cleanup. - Testing —
renderHook,PBVexProvider, and mock transports.
Core concepts
- One
PBVexProviderprovides aClientto the component tree. useQueryreturns the latest query value orundefinedwhile loading.useQueryResultreturns the full{ data, error, isLoading }state.- Mutations and actions are stable callables returned by hooks.
- All subscriptions use
useSyncExternalStorewith a sharedQueryStore.
Cross-links
- Underlying client behavior is documented in the client guides.
- Server-side concepts are in the core guides: Authoring functions, Schema, Authentication.