SmithersProvider
The<SmithersProvider> component provides database and execution context to all child components. It’s required at the root of every Smithers workflow.
Basic Usage
Props
The PGlite database instance for state persistence.
Unique identifier for the current execution.
Optional configuration for the workflow.
Context Values
Child components can access the context using theuseSmithers hook:
Request Stop
Stop the workflow programmatically:Request Rebase
Request a VCS rebase operation:Accessing the Database
Access the database directly from any child component:Complete Example
Best Practices
Always wrap with SmithersProvider
Always wrap with SmithersProvider
All Smithers components require the provider:
Close the database when done
Close the database when done
Ensure writes are flushed:
Check for incomplete executions
Check for incomplete executions
Resume interrupted workflows: