<@UHAJKUSTU> the various Decompose components in C...
# confetti
j
@Arkadii Ivanov the various Decompose components in Confetti all seem to include a corresponding
simpleComponent
....you might have mentioned this before but is this just to delegate some of the responsibility?
I'm trying to capture some core parts of Decompose implementation in a couple of slides and looking to see how much I can distil it down 🙂
a
As far as I remember, there were dependencies between ViewModels. E.g.
BookmarksViewModel
had been dependent on
SessionsViewModel
. With Decompose, we were able to extract reusable code into a separate component called
SimpleSessionsComponent
. Which is reused in
SessionsComponent
,
BookmarksComponent
, etc.
👍 1
j
ah, ok, thanks....I see that dependency now
👍 1
y
Is this sort of the non MAD UseCase?
a
What's MAD?
a
Well, before Decompose, some ViewModels depended on another ViewModels. Those ViewModels were stateful and with a coroutine scope. So I tried to keep that. Since not everything from SessionsComponent is required in BookmarksComponent, I extracted the common part into a separate SimpleSessionsComponent.
👍🏻 1
I usually don't follow clean arch and the terminology, but we can treat SimpleSessionsComponent as a UseCase, perhaps.