Hey Arkadi, Have you ever had the use case in whic...
# mvikotlin
n
Hey Arkadi, Have you ever had the use case in which you need some parameters in the creation Store that will be provided to the Bootstrapper? For example a creation/edition screen’s store in which you can provide with an id of an item or not. If you provide it, the Bootstrapper will dispatch the fetch action. How would you do this? Thanks 🙇
In a basic MVI with jetpack’s ViewModel I would use constructor parameters for this.
a
Hello! You can and probably should use constructors here as well. You can pass parameters to the factory's constructor. Then you can either make the Bootstrapper an inner class, or pass the parameters to it's constructor as well.
K 2
n
Oh, man, that sounds so obvious now 😅. I think I've lost my train of thoughts around the factory. Thanks!! 🤗
a
👍 no problem, Happy New year!