Guides
In-depth guides for specific HexDI use cases and integrations.
Available Guides
React Integration
Complete guide to using HexDI with React applications:
- Setting up typed hooks and providers
- Using
ContainerProvider,ScopeProvider, andAutoScopeProvider - Scope lifecycle management
- SSR considerations
Testing Strategies
How to test HexDI-powered applications:
- Unit testing adapters with
createAdapterTest() - Integration testing with
TestGraphBuilder - Creating mock adapters with
createMockAdapter() - Component testing with
renderWithContainer() - Vitest integration with
useTestContainer()
Error Handling
Understanding and handling HexDI errors:
- Error hierarchy and error codes
- Handling
CircularDependencyError - Handling
FactoryError - Best practices for error recovery
Quick Links by Task
| I want to... | Guide |
|---|---|
| Use HexDI in a React app | React Integration |
| Write tests for my services | Testing Strategies |
| Understand runtime errors | Error Handling |
| Mock dependencies in tests | Testing Strategies |