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
And you use that with two constructors NewBar(*Foo) *Bar and NewBaz(*Foo) *Bar,
both Dig and Fx will instantiate *Foo only once (calling that print statement only once)
and share it between Bar and Baz.
Is there anyway to make a provider function as singleton ?
There are cases we have one dependency object which must be initialized only once but is used by many other objects.
How to handle those cases in uber/dig ?