Brandi-React is the React bindings layer for Brandi.
It lets your React components get dependencies from Brandi containers.
Brandi-React requires React 16.8 or later. You'll also need to install Brandi.
The Brandi-React source code is written in TypeScript but we precompile both CommonJS and ESModule builds to ES2018.
Additionally, we provide builds precompiled to ESNext by
TypeScript type definitions are included in the library and do not need to be installed additionally.
ContainerProvider— makes the Brandi container available to any nested components that need to use injections.
useInjection(token)— allows you to get a dependency from a container.
createInjectionHooks(...tokens)— creates hooks for getting dependencies more easily.
tagged(...tags)(Component, [options])— attaches tags to the component and all nested components.