Description
Ditox.js is a lightweight dependency injection container for TypeScript. It gives you a simple functional API to bind values and factories to a container by tokens, and to resolve them later. Factory bindings support singleton, scoped and transient scopes, and bindings can be organised into declarative dependency modules. The library supports container hierarchies and multi-value tokens, and it is typed with TypeScript. There are no class decorators, field injectors or other magic: binding and resolving are explicit. The library ships as two packages, ditox for the container and core tools, and ditox-react for React applications. You install them from npm, or load the UMD builds from jsDelivr with a script tag. The docs cover basic concepts, usage examples such as binding a value and a factory, and using the container in a React app. The source is on GitHub with a licence file.…
Highlights
- Functional API for binding values and factories
- Singleton, scoped and transient scopes
- Container hierarchy and dependency modules
- Multi-value tokens and TypeScript types
- ditox-react package for React apps
Ratings & Reviews
No ratings yet
Be the first to rate Ditox.
People also visit
Ditox FAQ
What is Ditox.js?
A lightweight dependency injection container for TypeScript that binds values and factories to tokens and resolves them later.
Does it use decorators?
No. The docs say there are no class decorators, field injectors or other magic. Binding and resolving are explicit.
How do I install it?
Run npm install ditox, and npm install ditox-react for React. You can also load the UMD builds from jsDelivr with a script tag.
Is it open source?
Yes. The repository on GitHub includes a LICENSE file.
What are the best Ditox alternatives?
Popular alternatives to Ditox include ReacType, Sveld and Effect. See all Ditox alternatives














