useInjection
The useInjection(token) hook allows you to get a dependency
from a container provided through ContainerProvider.
Arguments#
token:TokenValue.
Returns#
TokenType<TokenValue> โ a dependency bound to the token.
Example#
The binding of TOKENS.userService was shown
in the example in ContainerProvider section.
For more information about TOKENS.logger.optional syntax,
see the Optional Dependencies documentation section.