Hi! I have browser app using Decompose & MVIKotlin. I have to pass
HttpClient
to many components and I'm curious how to do it in right way.
I can use global
val
, but somehow I feel it is not right way (I'm old Java developer 😉)
I tried to use Koin, but I'm not sure it is not too big tool for that small thing. Especially I'm not sure if it is possible to put components into Koin modules.
Any advice? 🙂 Thanks in advance!
How, the h…, I missed this feature?!?!?!
Almost all my components will use HTTP client, so custom Context sounds promising.
But when more experienced colleague says "personally I would", then new doubts arise.
Thanks a lot!
a
Arkadii Ivanov
07/29/2022, 1:20 PM
That's totally fine because I don't care much about boilerplate, or lines of code. But exactly because some people do care, there are things like custom ComponentContext, DSL in MVIkotlin, etc.