Skip to main content

Dependency Injection Documentation

Welcome to the Navios DI documentation. This section covers the dependency injection system that powers Navios applications.

Packages

A lightweight, type-safe dependency injection container for TypeScript. Features hierarchical containers, multiple scopes, and async resolution.

Key Features:

  • Type-safe dependency resolution
  • Hierarchical containers with scope inheritance
  • Request, Singleton, and Transient scopes
  • Async factory support
  • Event bus for inter-service communication
  • Injection tokens with Zod schema validation
  • Factory pattern support
  • Service lifecycle management

Get Started with DI

React bindings for @navios/di. Seamlessly integrate dependency injection into your React applications with hooks and providers.

Key Features:

  • React context integration
  • useService and useSuspenseService hooks
  • Automatic scope management
  • Server-side rendering support
  • Automatic invalidation subscriptions
  • Optional service support

React Integration