Mateu
01/10/2024, 10:53 AMArkadii Ivanov
01/10/2024, 12:24 PMOne Top Child slot to automatically navigate from authentication to authenticatedIs there any reason for using Child Slot for auth flow? I would implement it as a stack in the root. You can extract the auth flow to a separate
AuthComponent
. When you need to start the auth flow in the root, you can just replaceAll(Config.Auth)
. Once auth is ok, you can replaceAll(Config.Main)
, where MainComonent
manages the authenticated sub-tree.
One stack inside the screen selected in the bottom bar to navigate inside itThis is valid if you need your stack to never cover the bottom bar (i.e. always inside the selected tab).
Mateu
01/12/2024, 10:55 AMArkadii Ivanov
01/12/2024, 11:24 AMThe main app can be either in Splash, Authentication, Authenticated (main)This is essentially what I proposed. 👍
I've used a child slot.I'd recommend to use Child Stack instead. Child Slot can be empty (null), whereas Child Stack can't. It still makes sense even if you need to disallow going back. Just don't pass
handleBackButton
argument.
I hide bottom bars.That's up to you, but with decompose you can avoid doing this. You can have your
Authenticated
component to manage a stack of full-screen components. Then you can have HomeComponent
with bottom bar and it's own stack of non-fullscreen components (tabs).Mateu
01/16/2024, 9:35 AMThat's up to you, but with decompose you can avoid doing this. You can have yourWhat you propose is having a stack for fullscreen components. In a component of this 1st stack, another stack of screens with bottom bar. If a child component of the 2n stack needs to go full screen we add it as a child of the main 1st stack. Is this it?component to manage a stack of full-screen components. Then you can haveAuthenticated
with bottom bar and it's own stack of non-fullscreen components (tabs).HomeComponent
Arkadii Ivanov
01/16/2024, 9:38 AM