React Hooks Reference
React Hooks Reference
Section titled “React Hooks Reference”Overview
Section titled “Overview”Integra provides React Query hooks for seamless workflow state management with automatic caching, polling, and optimistic updates.
Data Hooks
Section titled “Data Hooks”useWorkflow(workflowId)
Section titled “useWorkflow(workflowId)”Fetch workflow data with automatic polling during verification and publishing states. Polls every 2 seconds during active states.
useWorkflowABI(workflowId)
Section titled “useWorkflowABI(workflowId)”Fetch parsed contract ABI with infinite cache time for performance.
useWorkflowIsLoading(workflowId)
Section titled “useWorkflowIsLoading(workflowId)”Boolean hook indicating if workflow is in verifying or publishing state.
useWorkflowStep(workflowId)
Section titled “useWorkflowStep(workflowId)”Get current step number in workflow progression.
useWorkflowStepCompleted(workflowId, step)
Section titled “useWorkflowStepCompleted(workflowId, step)”Check if specific workflow step is completed.
Mutation Hooks
Section titled “Mutation Hooks”useCreateWorkflow()
Section titled “useCreateWorkflow()”Create new workflow with optimistic cache updates.
useSaveMetadata(workflowId)
Section titled “useSaveMetadata(workflowId)”Save metadata with automatic cache synchronization.
useSaveUISchema(workflowId)
Section titled “useSaveUISchema(workflowId)”Save UI schema with cache updates.
useSkipUISchema(workflowId)
Section titled “useSkipUISchema(workflowId)”Skip UI step with default application.
usePublish(workflowId)
Section titled “usePublish(workflowId)”Publish workflow with polling for completion.
useRetry(workflowId)
Section titled “useRetry(workflowId)”Retry failed workflow with cache invalidation.
useDeleteWorkflow(workflowId)
Section titled “useDeleteWorkflow(workflowId)”Delete workflow and remove from cache.
Caching Strategy
Section titled “Caching Strategy”Hooks use hierarchical query keys for efficient cache management and automatic invalidation when mutations occur.