https://kotlinlang.org logo
#decompose
Title
# decompose
n

Nacho Ruiz Martin

10/29/2023, 8:35 AM
Hey 👋 I have a functioning app on Android with traditional navigation. I always wanted to make it multiplatform, but I decided to go with the known ground first, go Android-only, and then migrate everything. I now think it was a mistake especially because the navigation paradigm is so different. But anyway, I want to use Decompose because I’ve been using MviKotlin and Essenty already and it looks almighty, and now I’m trying to wrap my brain around the new paradigm. 1. Does this (screenshot) Bloc diagram make sense -especially the part of the
Home
- if my app has a bottom bar with 4 destinations and the rest should be fullscreen? 2. In terms of code modularization I don’t really have a module in which to place
Main
or
Home
, are you people creating specific modules for this Blocs or just throwing them into the
Root
one? 3. I have some actions that will redirect the user from a “fullscreen” component into one specific of
Home
, let’s say
Profile
, is that doable? 4. WDYT of
Home
as naming? It’s only the place in which bottom bar destinations will be placed. Sorry if any of the questions is a basic one, as I said, this is me doing baby steps in this navigation paradigm. Many thanks! 🙇
image.png
a

Arkadii Ivanov

10/29/2023, 11:15 AM
From my point of view, the "Home" name totally makes sense for a bottom nav container component. You might be interested in my talk that uses a similar structure:

https://www.youtube.com/watch?v=FFO_4NNDUoU

Also, switching from the official navigation (with ViewModels) to Decompose is usually straightforward. You can check my PR with converting the Confetti sample to Decompose: https://github.com/joreilly/Confetti/pull/688.
n

Nacho Ruiz Martin

10/29/2023, 11:43 AM
Thanks for the response! I'll watch your talk. 👍👏 I'll go with this approach, then
decompose intensifies 2