<@UHAJKUSTU> In Decompose, why can't configuration...
# compose-desktop
s
@Arkadii Ivanov In Decompose, why can't configurations on the stack be duplicated?
I have a use case that I'm not sure how to handle otherwise. From my customer screen, I show a list of tickets that can be navigated to and from the ticket screen, the customer can be navigated to. I can avoid the cycle, but it would make the back navigation a bit surprising to the user.
a
Please see the explanation - https://github.com/arkivanov/Decompose/discussions/51 For your case, you can either add an
index
argument to your configuration or any other argument to make the configuration unique. Or actually use
bringToFront
to avoid long back stacks, which also could be inconvenient for users.
s
Ah! Thanks! Without that explanation the behavior is a bit baffling. I think bringToFront will work well for me.
a
Yeah, there is also a documentation page you might be interested in - https://arkivanov.github.io/Decompose/child-stack/overview/#component-configurations
s
I just wanted to say thanks again. I just finished upgrading from 0.7 to 0.8 and got to test
bringToFront
. It fixes my issue and I think the UX is ok. This library has been really helpful for me to add desktop support.
a
Thanks for the feedback!