You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, a registered component's init function will be automatically injected during initialization of the function regardless of if the function is decorated with an Injector. Given this example:
When initialize_component is called by diecast during injection, the initialize_component function will be injected twice. Best case, it's just additional overhead. Worst case, it attempts to rebind the function when parameters are already bound, overwriting the first injected value or just failing.
The created injector should "mark" the injected function, so that the component initializer knows not to re-inject dependencies into the initializer function.
The text was updated successfully, but these errors were encountered:
Currently, a registered component's
init
function will be automatically injected during initialization of the function regardless of if the function is decorated with anInjector
. Given this example:When
initialize_component
is called bydiecast
during injection, theinitialize_component
function will be injected twice. Best case, it's just additional overhead. Worst case, it attempts to rebind the function when parameters are already bound, overwriting the first injected value or just failing.The created injector should "mark" the injected function, so that the component initializer knows not to re-inject dependencies into the initializer function.
The text was updated successfully, but these errors were encountered: