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

Archie

03/24/2023, 7:25 AM
Hi just new to using
Decompose
and simply just checking it out for our usecase. I am having trouble understanding how to setup the navigation. If I have multiple screen: Login | ---> Dashboard | ---> SignUp | ---> Create Password | ---> Dashboard Do I just declare it as a Single Stack Navigation:
Copy code
sealed class Child {
    class Login() : Child()
    class SignUp() : Child()
    class CreatePassword() : Child()
    class Dashboard() : Child()
}
My other question is how does
OverlayNavigation<DialogConfig>()
fit into this if I need some Dialog PopUps?
a

Arkadii Ivanov

03/24/2023, 9:32 AM
So your app has two states - logged in and logged out. If logged in, then the dashboard is shown. If logged out, then - either login or sign-up. Is it correct? How Create Password fits in the sign-up flow?
a

Archie

03/24/2023, 9:34 AM
create password is part of the logged out flow.. just really confuse on how to structure them.. Is it correct to have RootComponent to have a NavigationStack And Login Also have a NavigationStack?
a

Arkadii Ivanov

03/24/2023, 9:38 AM
No problem! You can watch my talk, that uses exactly this use case as an example - https://www.droidcon.com/2022/11/14/decompose-your-kotlin-multiplatform-project-into-feature-modules-london22/
If there are any questions, don't hesitate to ask
a

Archie

03/24/2023, 11:08 AM
Thanks @Arkadii Ivanov, I think I’m getting a hang of it. There are still things I’m not sure about. Maybe I’ll follow up here some questions. But thanks for the resources.
13 Views